]> granicus.if.org Git - postgis/commitdiff
Updated to reflect geos version string split.
authorSandro Santilli <strk@keybit.net>
Thu, 22 Jul 2004 16:58:08 +0000 (16:58 +0000)
committerSandro Santilli <strk@keybit.net>
Thu, 22 Jul 2004 16:58:08 +0000 (16:58 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@647 b70326c6-7e19-0410-871a-916f4a2858ee

postgis_geos.c
postgis_geos_wrapper.cpp

index d83d7536e1f80df8fc908908a3767f8594482fc9..b3b2b8dc0511a9fd761be4c6fc471af3e57174b5 100644 (file)
@@ -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);
index daa1715472246e7611fabed5a2603de83491c8ee..3ebc9ce2d88aac024292ebac57e2f7684b1dd3de 100644 (file)
@@ -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;