[geos-commits] r3727 - trunk/src/operation/buffer
svn_geos at osgeo.org
svn_geos at osgeo.org
Tue Dec 4 11:26:49 PST 2012
Author: strk
Date: 2012-12-04 11:26:48 -0800 (Tue, 04 Dec 2012)
New Revision: 3727
Modified:
trunk/src/operation/buffer/RightmostEdgeFinder.cpp
Log:
Fix an abort in Buffer op (RightmostEdgeFinder)
Rather than abort we throw a TopologyException, because the problem
seems to occur when noding isn't correct.
See http://trac.osgeo.org/geos/ticket/605
Modified: trunk/src/operation/buffer/RightmostEdgeFinder.cpp
===================================================================
--- trunk/src/operation/buffer/RightmostEdgeFinder.cpp 2012-12-04 17:23:41 UTC (rev 3726)
+++ trunk/src/operation/buffer/RightmostEdgeFinder.cpp 2012-12-04 19:26:48 UTC (rev 3727)
@@ -24,6 +24,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>
@@ -72,6 +73,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