From: Sandro Santilli Date: Wed, 29 Oct 2003 15:53:10 +0000 (+0000) Subject: geoscentroid() removed. both geos and pgis versions are called 'centroid'. X-Git-Tag: pgis_0_8_0~42 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d3334c6014105066ae743c495ccceeb92eae486c;p=postgis geoscentroid() removed. both geos and pgis versions are called 'centroid'. only one version will be compiled based on USE_GEOS flag. git-svn-id: http://svn.osgeo.org/postgis/trunk@340 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/postgis_fn.c b/postgis_fn.c index a0de8a6ab..be8a47c29 100644 --- a/postgis_fn.c +++ b/postgis_fn.c @@ -11,6 +11,10 @@ * ********************************************************************** * $Log$ + * Revision 1.30 2003/10/29 15:53:10 strk + * geoscentroid() removed. both geos and pgis versions are called 'centroid'. + * only one version will be compiled based on USE_GEOS flag. + * * Revision 1.29 2003/10/28 16:57:35 strk * Added collect_garray() function. * @@ -2255,6 +2259,7 @@ Datum isclosed(PG_FUNCTION_ARGS) PG_RETURN_BOOL(TRUE); } +#ifndef USE_GEOS PG_FUNCTION_INFO_V1(centroid); Datum centroid(PG_FUNCTION_ARGS) { @@ -2310,6 +2315,7 @@ Datum centroid(PG_FUNCTION_ARGS) PG_RETURN_POINTER(result); } +#endif // ! defined USE_GEOS // max_distance(geom,geom) (both geoms must be linestrings) //find max distance between l1 and l2 diff --git a/postgis_geos.c b/postgis_geos.c index 8f1b035cf..3142d2a7e 100644 --- a/postgis_geos.c +++ b/postgis_geos.c @@ -10,6 +10,10 @@ * ********************************************************************** * $Log$ + * Revision 1.20 2003/10/29 15:53:10 strk + * geoscentroid() removed. both geos and pgis versions are called 'centroid'. + * only one version will be compiled based on USE_GEOS flag. + * * Revision 1.19 2003/10/29 13:59:40 strk * Added geoscentroid function. * @@ -201,8 +205,6 @@ Datum issimple(PG_FUNCTION_ARGS); Datum isring(PG_FUNCTION_ARGS); Datum geomequals(PG_FUNCTION_ARGS); Datum pointonsurface(PG_FUNCTION_ARGS); -Datum geoscentroid(PG_FUNCTION_ARGS); - Geometry *POSTGIS2GEOS(GEOMETRY *g); @@ -745,8 +747,8 @@ Datum pointonsurface(PG_FUNCTION_ARGS) PG_RETURN_POINTER(result); } -PG_FUNCTION_INFO_V1(geoscentroid); -Datum geoscentroid(PG_FUNCTION_ARGS) +PG_FUNCTION_INFO_V1(centroid); +Datum centroid(PG_FUNCTION_ARGS) { GEOMETRY *geom, *result; Geometry *geosgeom, *geosresult; @@ -1852,12 +1854,5 @@ Datum pointonsurface(PG_FUNCTION_ARGS) PG_RETURN_NULL(); // never get here } -PG_FUNCTION_INFO_V1(pointonsurface); -Datum geoscentroid(PG_FUNCTION_ARGS) -{ - elog(ERROR,"geoscentroid:: operation not implemented - compile PostGIS with GEOS support"); - PG_RETURN_NULL(); // never get here -} - #endif