[geos-commits] r3608 - branches/3.3/include/geos/operation/union

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


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

Modified:
   branches/3.3/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: branches/3.3/include/geos/operation/union/UnaryUnionOp.h
===================================================================
--- branches/3.3/include/geos/operation/union/UnaryUnionOp.h	2012-04-10 15:04:30 UTC (rev 3607)
+++ branches/3.3/include/geos/operation/union/UnaryUnionOp.h	2012-04-10 15:16:06 UTC (rev 3608)
@@ -25,11 +25,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)
@@ -183,12 +185,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