From: Sandro Santilli Date: Thu, 22 Jul 2004 16:58:08 +0000 (+0000) Subject: Updated to reflect geos version string split. X-Git-Tag: pgis_0_9_1~147 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4e5afe0f52f098a7cef807fcbc9013bd1ec8e966;p=postgis Updated to reflect geos version string split. git-svn-id: http://svn.osgeo.org/postgis/trunk@647 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/postgis_geos.c b/postgis_geos.c index d83d7536e..b3b2b8dc0 100644 --- a/postgis_geos.c +++ b/postgis_geos.c @@ -10,6 +10,9 @@ * ********************************************************************** * $Log$ + * Revision 1.34 2004/07/22 16:58:08 strk + * Updated to reflect geos version string split. + * * Revision 1.33 2004/07/22 16:20:10 strk * Added postgis_lib_version() and postgis_geos_version() * @@ -185,6 +188,7 @@ extern char GEOSisEmpty(Geometry *g1); extern char *GEOSGeometryType(Geometry *g1); extern int GEOSGeometryTypeId(Geometry *g1); extern char *GEOSversion(); +extern char *GEOSjtsport(); extern void GEOSdeleteChar(char *a); diff --git a/postgis_geos_wrapper.cpp b/postgis_geos_wrapper.cpp index daa171547..3ebc9ce2d 100644 --- a/postgis_geos_wrapper.cpp +++ b/postgis_geos_wrapper.cpp @@ -2,6 +2,9 @@ /* * $Log$ +* Revision 1.27 2004/07/22 16:58:08 strk +* Updated to reflect geos version string split. +* * Revision 1.26 2004/07/22 16:20:10 strk * Added postgis_lib_version() and postgis_geos_version() * @@ -140,6 +143,7 @@ extern "C" char GEOSrelateWithin(Geometry *g1, Geometry*g2); extern "C" char GEOSrelateContains(Geometry *g1, Geometry*g2); extern "C" char GEOSrelateOverlaps(Geometry *g1, Geometry*g2); extern "C" char *GEOSversion(); +extern "C" char *GEOSjtsport(); extern "C" Geometry *PostGIS2GEOS_point(POINT3D *point,int SRID, bool is3d); extern "C" Geometry *PostGIS2GEOS_linestring(const LINE3D *line,int SRID, bool is3d); @@ -1517,9 +1521,25 @@ GEOSversion() * GEOS upgrade needs postgis re-build, so this static * assignment is not going to be a problem */ - char *res = strdup("GEOS 1.0.0 ported from JTS-1.3"); + char *res = strdup("1.0.0"); +#else + string version = geosversion(); + char *res = strdup(version.c_str()); +#endif + return res; +} + +char * +GEOSjtsport() +{ +#if GEOS_LAST_INTERFACE < 2 + /* + * GEOS upgrade needs postgis re-build, so this static + * assignment is not going to be a problem + */ + char *res = strdup("1.3"); #else - string version = geos::version(); + string version = jtsport(); char *res = strdup(version.c_str()); #endif return res;