[geos-commits] r4029 - in branches/3.4: . src/geomgraph/index

svn_geos at osgeo.org svn_geos at osgeo.org
Mon Nov 10 01:33:01 PST 2014


Author: strk
Date: 2014-11-10 01:33:01 -0800 (Mon, 10 Nov 2014)
New Revision: 4029

Modified:
   branches/3.4/NEWS
   branches/3.4/src/geomgraph/index/SimpleMCSweepLineIntersector.cpp
Log:
Make RelateComputer interruptible (#711)

Injects interruptibility calls in SimpleMCSweepLineIntersector

Funded by CartoDB

Modified: branches/3.4/NEWS
===================================================================
--- branches/3.4/NEWS	2014-11-04 18:17:44 UTC (rev 4028)
+++ branches/3.4/NEWS	2014-11-10 09:33:01 UTC (rev 4029)
@@ -9,6 +9,7 @@
  - Throw a ParseException on missing chars from HEXWKB string (#675)
  - Fix ruby binding build (https://github.com/libgeos/libgeos/pull/32)
  - Make polygonize operation interruptable
+ - Make relate-based operations interruptable (#711)
  - Update for Visual Studio 2013 (#691)
  - Fix support of PHP bindings for version < 5.4.0 (#709)
 

Modified: branches/3.4/src/geomgraph/index/SimpleMCSweepLineIntersector.cpp
===================================================================
--- branches/3.4/src/geomgraph/index/SimpleMCSweepLineIntersector.cpp	2014-11-04 18:17:44 UTC (rev 4028)
+++ branches/3.4/src/geomgraph/index/SimpleMCSweepLineIntersector.cpp	2014-11-10 09:33:01 UTC (rev 4029)
@@ -21,6 +21,7 @@
 #include <geos/geomgraph/index/MonotoneChain.h>
 #include <geos/geomgraph/index/SweepLineEvent.h>
 #include <geos/geomgraph/Edge.h>
+#include <geos/util/Interrupt.h>
 
 using namespace std;
 
@@ -93,6 +94,7 @@
 	events.reserve(events.size()+(n*2));
 	for(size_t i=0; i<n; ++i)
 	{
+		GEOS_CHECK_FOR_INTERRUPTS();
 		MonotoneChain *mc=new MonotoneChain(mce,i);
 		SweepLineEvent *insertEvent=new SweepLineEvent(edgeSet,mce->getMinX(i),NULL,mc);
 		events.push_back(insertEvent);
@@ -111,6 +113,7 @@
 	sort(events.begin(), events.end(), SweepLineEventLessThen());
 	for(size_t i=0; i<events.size(); ++i)
 	{
+		GEOS_CHECK_FOR_INTERRUPTS();
 		SweepLineEvent *ev=events[i];
 		if (ev->isDelete())
 		{
@@ -126,6 +129,7 @@
 	prepareEvents();
 	for(size_t i=0; i<events.size(); ++i)
 	{
+		GEOS_CHECK_FOR_INTERRUPTS();
 		SweepLineEvent *ev=events[i];
 		if (ev->isInsert())
 		{



More information about the geos-commits mailing list