From 067ed8dd0c1ebe38afff963300320b8fdc00a6f1 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Wed, 16 Jun 2004 19:59:36 +0000 Subject: [PATCH] Changed GEOS_VERSION to POSTGIS_GEOS_VERSION to avoid future clashes git-svn-id: http://svn.osgeo.org/postgis/trunk@632 b70326c6-7e19-0410-871a-916f4a2858ee --- geos_version.sh | 3 ++- postgis_geos.c | 14 +++++++++++--- postgis_geos_wrapper.cpp | 15 +++++++++------ 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/geos_version.sh b/geos_version.sh index ee6173785..730c226f1 100755 --- a/geos_version.sh +++ b/geos_version.sh @@ -15,5 +15,6 @@ else geos_version=`printf %d%2.2d $major $minor` fi cat < 1.0 * @@ -1783,7 +1786,7 @@ POSTGIS2GEOS(GEOMETRY *g) elog(NOTICE, "POSTGIS2GEOS: COLLECTION has %d objs, srid %d and is %s 3d", g->nobjs, g->SRID, g->is3d ? "" : "not"); #endif geos = PostGIS2GEOS_collection(geoms,g->nobjs,g->SRID,g->is3d); -#if GEOS_VERSION > 100 +#if POSTGIS_GEOS_VERSION > 100 for (t=0; tnobjs; t++) GEOSdeleteGeometry(geoms[t]); #endif @@ -1826,8 +1829,6 @@ Datum GEOSnoop(PG_FUNCTION_ARGS) PG_RETURN_POINTER(result); } - - //---------------------------------------------------------------------------- // NULL implementation here // --------------------------------------------------------------------------- @@ -2013,5 +2014,12 @@ Datum GEOSnoop(PG_FUNCTION_ARGS) PG_RETURN_NULL(); } +PG_FUNCTION_INFO_V1(GEOSversion); +Datum GEOSversion(PG_FUNCTION_ARGS) +{ + elog(ERROR,"GEOSversion:: operation not implemented - compile PostGIS with GEOS support"); + PG_RETURN_NULL(); +} + #endif diff --git a/postgis_geos_wrapper.cpp b/postgis_geos_wrapper.cpp index 87b0952f5..738957e9f 100644 --- a/postgis_geos_wrapper.cpp +++ b/postgis_geos_wrapper.cpp @@ -2,6 +2,9 @@ /* * $Log$ +* Revision 1.21 2004/06/16 19:59:36 strk +* Changed GEOS_VERSION to POSTGIS_GEOS_VERSION to avoid future clashes +* * Revision 1.20 2004/06/16 19:37:54 strk * Added cleanup needed for GEOS > 1.0 * @@ -366,8 +369,8 @@ Geometry *PostGIS2GEOS_multipolygon(POLYGON3D **polygons,int npolys, int SRID, b subPolys->push_back(PostGIS2GEOS_polygon(polygons[t], SRID,is3d )); } g = geomFactory->createMultiPolygon(subPolys); -#if GEOS_VERSION > 100 - for (t=0; tsize(); t++) +#if POSTGIS_GEOS_VERSION > 100 + for (t=0; t<(int)subPolys->size(); t++) delete (*subPolys)[t]; #endif delete subPolys; @@ -408,8 +411,8 @@ PostGIS2GEOS_multilinestring(const LINE3D **lines, int nlines, int SRID, bool is // geometries pointed to by subLines will be owned // by returned MultiLineString object g = geomFactory->createMultiLineString(subLines); -#if GEOS_VERSION > 100 - for (t=0; tsize(); t++) delete (*subLines)[t]; +#if POSTGIS_GEOS_VERSION > 100 + for (t=0; t<(int)subLines->size(); t++) delete (*subLines)[t]; #endif delete subLines; if (g==NULL) return NULL; @@ -441,8 +444,8 @@ Geometry *PostGIS2GEOS_multipoint(POINT3D **points,int npoints, int SRID, bool i subPoints->push_back(PostGIS2GEOS_point(points[t], SRID,is3d )); } g = geomFactory->createMultiPoint(subPoints); -#if GEOS_VERSION > 100 - for (t=0; tsize(); t++) +#if POSTGIS_GEOS_VERSION > 100 + for (t=0; t<(int)subPoints->size(); t++) delete (*subPoints)[t]; #endif delete subPoints; -- 2.40.0