From: Sandro Santilli Date: Sun, 28 Feb 2010 17:11:10 +0000 (+0000) Subject: cleanups X-Git-Tag: 2.0.0alpha1~3163 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eb21d5a0e01bac35e043dbe42e19a2cba5cfcd30;p=postgis cleanups git-svn-id: http://svn.osgeo.org/postgis/trunk@5351 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/postgis/lwgeom_geos_clean.c b/postgis/lwgeom_geos_clean.c index ea005f051..07089b961 100644 --- a/postgis/lwgeom_geos_clean.c +++ b/postgis/lwgeom_geos_clean.c @@ -482,13 +482,6 @@ LWGEOM_GEOS_makeValidPolygon(const GEOSGeometry* gin) } geos_cut_edges = GEOSDifference(geos_bound_noded, geos_bound); -#if 0 - { - GEOSGeometry const *vgeoms[1]; - vgeoms[0] = geos_bound_noded; - geos_cut_edges = GEOSPolygonizer_getCutEdges(vgeoms, 1); - } -#endif GEOSGeom_destroy(geos_bound); if ( ! geos_cut_edges ) /* an exception ? */ { @@ -614,7 +607,7 @@ LWGEOM_GEOS_makeValidPolygon(const GEOSGeometry* gin) /* cleanup and throw */ lwnotice("GEOSGeom_createCollection() threw an error: %s", loggederror); - return 0; + return NULL; } } @@ -759,7 +752,8 @@ lwgeom_make_valid(LWGEOM* lwgeom_in) if ( ! geosgeom ) return NULL; - /* Now check if every point of input is also found + /* + * Now check if every point of input is also found * in output, or abort by returning NULL * * Input geometry was lwgeom_in @@ -817,7 +811,6 @@ Datum ST_CleanGeometry(PG_FUNCTION_ARGS) PG_LWGEOM *in, *out; LWGEOM *lwgeom_in, *lwgeom_out; - /* int is3d; */ in = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); lwgeom_in = lwgeom_deserialize(SERIALIZED_FORM(in)); @@ -830,8 +823,6 @@ Datum ST_CleanGeometry(PG_FUNCTION_ARGS) PG_RETURN_POINTER(out); } - /* is3d = TYPE_HASZ(lwgeom_in->type); */ - lwgeom_out = lwgeom_make_valid(lwgeom_in); if ( ! lwgeom_out ) { PG_FREE_IF_COPY(in, 0);