[mapserver-commits] r9570 - tags/rel-5-6-0-rc1/mapserver

svn at osgeo.org svn at osgeo.org
Fri Nov 27 16:26:12 EST 2009


Author: dmorissette
Date: 2009-11-27 16:26:12 -0500 (Fri, 27 Nov 2009)
New Revision: 9570

Modified:
   tags/rel-5-6-0-rc1/mapserver/configure
   tags/rel-5-6-0-rc1/mapserver/configure.in
   tags/rel-5-6-0-rc1/mapserver/mapgeos.c
Log:
Backport and repackage release: Avoid build error with GEOS 2.2.x caused by missing GEOSSimplify() (#2753)

Modified: tags/rel-5-6-0-rc1/mapserver/configure
===================================================================
--- tags/rel-5-6-0-rc1/mapserver/configure	2009-11-27 21:16:01 UTC (rev 9569)
+++ tags/rel-5-6-0-rc1/mapserver/configure	2009-11-27 21:26:12 UTC (rev 9570)
@@ -10919,6 +10919,12 @@
 
   GEOS_ENABLED=-DUSE_GEOS
 
+    if test 300000 -le $ac_geos_version  ; then
+    echo "$as_me:$LINENO: result: GEOS >= 3.0.0 found. Adding -DGEOS_HAS_SIMPLIFY" >&5
+echo "${ECHO_T}GEOS >= 3.0.0 found. Adding -DGEOS_HAS_SIMPLIFY" >&6
+    GEOS_ENABLED="$GEOS_ENABLED -DGEOS_HAS_SIMPLIFY"
+  fi
+
   GEOS_INCDIR=`$GEOS_CONFIG --includes`
   GEOS_INC="-I$GEOS_INCDIR"
   GEOS_LIB="`$GEOS_CONFIG --libs`_c"

Modified: tags/rel-5-6-0-rc1/mapserver/configure.in
===================================================================
--- tags/rel-5-6-0-rc1/mapserver/configure.in	2009-11-27 21:16:01 UTC (rev 9569)
+++ tags/rel-5-6-0-rc1/mapserver/configure.in	2009-11-27 21:26:12 UTC (rev 9570)
@@ -1319,6 +1319,12 @@
 
   GEOS_ENABLED=-DUSE_GEOS
 
+  dnl GEOS 3.0+ required for GEOSSimplify
+  if test 300000 -le $ac_geos_version  ; then
+    AC_MSG_RESULT([GEOS >= 3.0.0 found. Adding -DGEOS_HAS_SIMPLIFY])
+    GEOS_ENABLED="$GEOS_ENABLED -DGEOS_HAS_SIMPLIFY"
+  fi
+
   GEOS_INCDIR=`$GEOS_CONFIG --includes`
   GEOS_INC="-I$GEOS_INCDIR"
   GEOS_LIB="`$GEOS_CONFIG --libs`_c"

Modified: tags/rel-5-6-0-rc1/mapserver/mapgeos.c
===================================================================
--- tags/rel-5-6-0-rc1/mapserver/mapgeos.c	2009-11-27 21:16:01 UTC (rev 9569)
+++ tags/rel-5-6-0-rc1/mapserver/mapgeos.c	2009-11-27 21:26:12 UTC (rev 9570)
@@ -669,7 +669,7 @@
 
 shapeObj *msGEOSSimplify(shapeObj *shape, double tolerance)
 {
-#ifdef USE_GEOS
+#if defined(USE_GEOS) && defined(GEOS_HAS_SIMPLIFY)
   GEOSGeom g1, g2; 
 
   if(!shape) 
@@ -684,14 +684,14 @@
   g2 = GEOSSimplify(g1, tolerance);
   return msGEOSGeometry2Shape(g2);
 #else
-  msSetError(MS_GEOSERR, "GEOS support is not available.", "msGEOSTopologyPreservingSimplifier()");
+  msSetError(MS_GEOSERR, "GEOS Simplify support is not available.", "msGEOSTopologyPreservingSimplifier()");
   return NULL;
 #endif
 }
 
 shapeObj *msGEOSTopologyPreservingSimplify(shapeObj *shape, double tolerance)
 {
-#ifdef USE_GEOS
+#if defined(USE_GEOS) && defined(GEOS_HAS_SIMPLIFY)
   GEOSGeom g1, g2; 
 
   if(!shape) 
@@ -706,7 +706,7 @@
   g2 = GEOSTopologyPreserveSimplify(g1, tolerance);
   return msGEOSGeometry2Shape(g2);
 #else
-  msSetError(MS_GEOSERR, "GEOS support is not available.", "msGEOSTopologyPreservingSimplifier()");
+  msSetError(MS_GEOSERR, "GEOS Simplify support is not available.", "msGEOSTopologyPreservingSimplifier()");
   return NULL;
 #endif
 }



More information about the mapserver-commits mailing list