[geos-commits] r3286 - in trunk: src/operation/overlay tests/xmltester

svn_geos at osgeo.org svn_geos at osgeo.org
Mon Apr 18 17:28:55 EDT 2011


Author: strk
Date: 2011-04-18 14:28:55 -0700 (Mon, 18 Apr 2011)
New Revision: 3286

Modified:
   trunk/src/operation/overlay/PolygonBuilder.cpp
   trunk/tests/xmltester/Makefile.am
Log:
Throw a TopologyException, rather than aborting, when finding more than a shell in MinimalEdgeRing list. Fixes bug #398. Enables automated test for it. Note that JTS fails the test now, triggering the failed assertion.

Modified: trunk/src/operation/overlay/PolygonBuilder.cpp
===================================================================
--- trunk/src/operation/overlay/PolygonBuilder.cpp	2011-04-18 21:28:46 UTC (rev 3285)
+++ trunk/src/operation/overlay/PolygonBuilder.cpp	2011-04-18 21:28:55 UTC (rev 3286)
@@ -244,7 +244,9 @@
 #endif
 		}
 	}
-	assert(shellCount <= 1); // found two shells in MinimalEdgeRing list
+	if ( shellCount > 1 ) {
+		throw util::TopologyException("found two shells in MinimalEdgeRing list");
+	}
 	return shell;
 }
 

Modified: trunk/tests/xmltester/Makefile.am
===================================================================
--- trunk/tests/xmltester/Makefile.am	2011-04-18 21:28:46 UTC (rev 3285)
+++ trunk/tests/xmltester/Makefile.am	2011-04-18 21:28:55 UTC (rev 3286)
@@ -29,6 +29,7 @@
 	$(srcdir)/tests/bug358.xml \
 	$(srcdir)/tests/bug360.xml \
 	$(srcdir)/tests/bug366.xml \
+	$(srcdir)/tests/bug398.xml \
 	$(srcdir)/tests/general/TestBoundary.xml \
 	$(srcdir)/tests/general/TestBuffer.xml \
 	$(srcdir)/tests/general/TestBufferMitredJoin.xml \



More information about the geos-commits mailing list