[geos-commits] r4022 - in trunk/src: geomgraph operation/overlay

svn_geos at osgeo.org svn_geos at osgeo.org
Thu Sep 25 08:17:18 PDT 2014


Author: strk
Date: 2014-09-25 08:17:18 -0700 (Thu, 25 Sep 2014)
New Revision: 4022

Modified:
   trunk/src/geomgraph/GeometryGraph.cpp
   trunk/src/operation/overlay/OverlayOp.cpp
Log:
Remove debugging lines, reduce cost of envelope filter

... when the filter envelope fully convers the geometry envelope

Modified: trunk/src/geomgraph/GeometryGraph.cpp
===================================================================
--- trunk/src/geomgraph/GeometryGraph.cpp	2014-09-25 10:46:20 UTC (rev 4021)
+++ trunk/src/geomgraph/GeometryGraph.cpp	2014-09-25 15:17:18 UTC (rev 4022)
@@ -368,9 +368,9 @@
 	typedef vector<Edge*> EC;
 	EC *se = edges;
 	EC self_edges_copy;
-	if ( env ) { // TODO: ... and env does not cover self geom env
+	if ( env && ! env->covers(parentGeom->getEnvelopeInternal()) ) {
 		collect_intersecting_edges(env, se->begin(), se->end(), self_edges_copy);
-    cerr << "(computeSelfNodes) Self edges reduced from " << se->size() << " to " << self_edges_copy.size() << endl;
+    //cerr << "(computeSelfNodes) Self edges reduced from " << se->size() << " to " << self_edges_copy.size() << endl;
 		se = &self_edges_copy;
 	}
 
@@ -414,14 +414,14 @@
 
 	EC *se = edges;
 	EC *oe = g->edges;
-	if ( env ) { // TODO: ... and env does not cover self geom env
+	if ( env && ! env->covers(parentGeom->getEnvelopeInternal()) ) {
 		collect_intersecting_edges(env, se->begin(), se->end(), self_edges_copy);
-    cerr << "Self edges reduced from " << se->size() << " to " << self_edges_copy.size() << endl;
+    //cerr << "Self edges reduced from " << se->size() << " to " << self_edges_copy.size() << endl;
 		se = &self_edges_copy;
 	}
-	if ( env ) { // TODO: ... and env does not cover other geom env
+	if ( env && ! env->covers(g->parentGeom->getEnvelopeInternal()) ) {
 		collect_intersecting_edges(env, oe->begin(), oe->end(), other_edges_copy);
-    cerr << "Other edges reduced from " << oe->size() << " to " << other_edges_copy.size() << endl;
+    //cerr << "Other edges reduced from " << oe->size() << " to " << other_edges_copy.size() << endl;
 		oe = &other_edges_copy;
 	}
 	esi->computeIntersections(se, oe, si);

Modified: trunk/src/operation/overlay/OverlayOp.cpp
===================================================================
--- trunk/src/operation/overlay/OverlayOp.cpp	2014-09-25 10:46:20 UTC (rev 4021)
+++ trunk/src/operation/overlay/OverlayOp.cpp	2014-09-25 15:17:18 UTC (rev 4022)
@@ -234,7 +234,7 @@
 void
 OverlayOp::copyPoints(int argIndex, const Envelope *env)
 {
-#define GEOS_DEBUG_COPY_POINTS 1
+//#define GEOS_DEBUG_COPY_POINTS 1
 
 #ifdef GEOS_DEBUG_COPY_POINTS
 	int copied = 0;



More information about the geos-commits mailing list