[mapserver-commits] r11470 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Tue Apr 5 16:11:33 EDT 2011


Author: tamas
Date: 2011-04-05 13:11:33 -0700 (Tue, 05 Apr 2011)
New Revision: 11470

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/mapgeos.c
Log:
Fixed msGEOSGeometry2Shape to handle 'GEOMETRYCOLLECTION EMPTY' as null geometry instead of raising an error (#3811)

Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2011-04-05 19:52:41 UTC (rev 11469)
+++ trunk/mapserver/HISTORY.TXT	2011-04-05 20:11:33 UTC (rev 11470)
@@ -15,6 +15,9 @@
 Current Version (SVN trunk): 
 ---------------------------- 
 
+- Fixed msGEOSGeometry2Shape to handle 'GEOMETRYCOLLECTION EMPTY' 
+  as null geometry instead of raising an error (#3811)
+
 - Re-added the MYSQL JOIN support. Had been removed with the MYGIS deprecated driver.
 
 - Add opacity to legend (#3740)

Modified: trunk/mapserver/mapgeos.c
===================================================================
--- trunk/mapserver/mapgeos.c	2011-04-05 19:52:41 UTC (rev 11469)
+++ trunk/mapserver/mapgeos.c	2011-04-05 20:11:33 UTC (rev 11470)
@@ -568,7 +568,8 @@
     return msGEOSGeometry2Shape_multipolygon(g);
     break;
   default:
-    msSetError(MS_GEOSERR, "Unsupported GEOS geometry type (%d).", "msGEOSGeometry2Shape()", type);
+    if (!GEOSisEmpty(g))
+        msSetError(MS_GEOSERR, "Unsupported GEOS geometry type (%d).", "msGEOSGeometry2Shape()", type);
     return NULL;
   }
 }



More information about the mapserver-commits mailing list