[geos-commits] r3609 - trunk/include/geos/operation/union

svn_geos at osgeo.org svn_geos at osgeo.org
Tue Apr 10 11:16:39 EDT 2012


Author: strk
Date: 2012-04-10 08:16:39 -0700 (Tue, 10 Apr 2012)
New Revision: 3609

Modified:
   trunk/include/geos/operation/union/UnaryUnionOp.h
Log:
Have UnaryUnion use BinaryOp for the simple case

See ticket #527 -- there's no infinite loop triggered by our
testsuite...

Modified: trunk/include/geos/operation/union/UnaryUnionOp.h
===================================================================
--- trunk/include/geos/operation/union/UnaryUnionOp.h	2012-04-10 15:16:06 UTC (rev 3608)
+++ trunk/include/geos/operation/union/UnaryUnionOp.h	2012-04-10 15:16:39 UTC (rev 3609)
@@ -24,11 +24,13 @@
 
 #include <geos/export.h>
 #include <geos/geom/GeometryFactory.h>
+#include <geos/geom/BinaryOp.h>
 #include <geos/geom/Point.h>
 #include <geos/geom/LineString.h>
 #include <geos/geom/Polygon.h>
 #include <geos/geom/util/GeometryExtracter.h>
-#include <geos/operation/overlay/snap/SnapIfNeededOverlayOp.h>
+#include <geos/operation/overlay/OverlayOp.h>
+//#include <geos/operation/overlay/snap/SnapIfNeededOverlayOp.h>
 
 #ifdef _MSC_VER
 #pragma warning(push)
@@ -182,12 +184,13 @@
   std::auto_ptr<geom::Geometry> unionNoOpt(const geom::Geometry& g0)
   {
     using geos::operation::overlay::OverlayOp;
-    using geos::operation::overlay::snap::SnapIfNeededOverlayOp;
+    //using geos::operation::overlay::snap::SnapIfNeededOverlayOp;
 
     if ( ! empty.get() ) {
       empty.reset( geomFact->createEmptyGeometry() );
     }
-    return SnapIfNeededOverlayOp::overlayOp(g0, *empty, OverlayOp::opUNION);
+    //return SnapIfNeededOverlayOp::overlayOp(g0, *empty, OverlayOp::opUNION);
+    return BinaryOp(&g0, empty.get(), overlay::overlayOp(OverlayOp::opUNION));
   }
 
   /**



More information about the geos-commits mailing list