[mapguide-commits] r6797 - branches/2.4/MgDev/Server/src/Services/Feature

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Wed Jun 20 04:13:46 PDT 2012


Author: jng
Date: 2012-06-20 04:13:45 -0700 (Wed, 20 Jun 2012)
New Revision: 6797

Modified:
   branches/2.4/MgDev/Server/src/Services/Feature/FeatureGeometricFunctions.cpp
Log:
The EXTENT() function can be derailed by bad geometries (One particular Sheboygan Parcel comes to mind). This submission ensures such cases doesn't disrupt the computation of the result.

Modified: branches/2.4/MgDev/Server/src/Services/Feature/FeatureGeometricFunctions.cpp
===================================================================
--- branches/2.4/MgDev/Server/src/Services/Feature/FeatureGeometricFunctions.cpp	2012-06-20 09:49:00 UTC (rev 6796)
+++ branches/2.4/MgDev/Server/src/Services/Feature/FeatureGeometricFunctions.cpp	2012-06-20 11:13:45 UTC (rev 6797)
@@ -108,7 +108,16 @@
     while(m_reader->ReadNext())
     {
         // Get the geometry
-        Ptr<MgGeometry> val = GetValue();
+        Ptr<MgGeometry> val;
+        try 
+        {
+            val = GetValue();
+        }
+        catch(MgException* ex) //Don't let a bad geometry derail us, just discard and continue
+        {
+            ex->Release();
+            continue;
+        }
 
         // Get the envelope
         Ptr<MgEnvelope> envl = val->Envelope();



More information about the mapguide-commits mailing list