[geos-commits] r3730 - in branches/3.3: . src/operation/buffer

svn_geos at osgeo.org svn_geos at osgeo.org
Tue Dec 4 13:43:29 PST 2012


Author: strk
Date: 2012-12-04 13:43:28 -0800 (Tue, 04 Dec 2012)
New Revision: 3730

Modified:
   branches/3.3/NEWS
   branches/3.3/src/operation/buffer/RightmostEdgeFinder.cpp
Log:
Fix abort in Buffer op (RightmostEdgeFinder)

Rather than aborting we throw a TopologyException,
because the problem occurs when noding isn't correct.
See http://trac.osgeo.org/geos/ticket/605

Modified: branches/3.3/NEWS
===================================================================
--- branches/3.3/NEWS	2012-12-04 21:39:24 UTC (rev 3729)
+++ branches/3.3/NEWS	2012-12-04 21:43:28 UTC (rev 3730)
@@ -1,3 +1,9 @@
+Changes in 3.3.7dev
+2012-MM-DD 
+
+- Bug fixes / improvements
+    - Fix abort in RightmostEdgeFinder (#605)
+
 Changes in 3.3.6
 2012-11-15 -- that's Post-GIS day !
 

Modified: branches/3.3/src/operation/buffer/RightmostEdgeFinder.cpp
===================================================================
--- branches/3.3/src/operation/buffer/RightmostEdgeFinder.cpp	2012-12-04 21:39:24 UTC (rev 3729)
+++ branches/3.3/src/operation/buffer/RightmostEdgeFinder.cpp	2012-12-04 21:43:28 UTC (rev 3730)
@@ -25,6 +25,7 @@
 #include <geos/geomgraph/Position.h>
 #include <geos/geomgraph/Node.h>
 #include <geos/geomgraph/Edge.h>
+#include <geos/util/TopologyException.h>
 
 #include <vector>
 #include <cassert>
@@ -73,6 +74,14 @@
 #endif
 	}
 
+  if ( ! minDe ) {
+    // I don't know why, but it looks like this can happen
+    // (invalid PlanarGraph, I think)
+    // See http://trac.osgeo.org/geos/ticket/605#comment:17
+    //
+    throw util::TopologyException("No forward edges found in buffer subgraph");
+  }
+
 #ifndef NDEBUG
 	assert(checked>0);
 	assert(minIndex>=0);



More information about the geos-commits mailing list