strk,

This patch avoids the defective logic (that exists later, somewhere)
It makes a logic short circuit more robust instead of fixing the underlying logic defect.

So be it.
It works for me..  for now.

I'll let you know how further testing goes.

bug_nasty.xml
and
hole_red.xml

both pass testing with this patch.


--- source/operation/buffer/SubgraphDepthLocater.cpp    (revision 1972)
+++ source/operation/buffer/SubgraphDepthLocater.cpp    (working copy)
@@ -180,11 +180,16 @@
       {
               BufferSubgraph *bsg=(*subgraphs)[i];

+#ifdef GEOS_DEBUG > 1
+ std::cerr << "findStabbedSegments envelope: " << bsg->getEnvelope() << " RayLeftpt: " << stabbingRayLeftPt << std::endl;
+#endif
               // optimization - don't bother checking subgraphs
               // which the ray does not intersect
               Envelope *env = bsg->getEnvelope();
               if ( stabbingRayLeftPt.y < env->getMinY()
-                       || stabbingRayLeftPt.y > env->getMaxY() )
+                       || stabbingRayLeftPt.y > env->getMaxY()
+                       || stabbingRayLeftPt.x < env->getMinX()
+                       || stabbingRayLeftPt.x > env->getMaxX())
                               continue;

findStabbedSegments(stabbingRayLeftPt, bsg->getDirectedEdges(),


C.



_______________________________________________
geos-devel mailing list
geos-devel@geos.refractions.net
http://geos.refractions.net/mailman/listinfo/geos-devel

Reply via email to