[geos-commits] [SCM] GEOS branch master updated. 8a4f50edddd9740742562b3f81ea2f5880eaf093
git at osgeo.org
git at osgeo.org
Thu Aug 13 08:27:44 PDT 2020
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GEOS".
The branch, master has been updated
via 8a4f50edddd9740742562b3f81ea2f5880eaf093 (commit)
from 34b8d63e72353166d149db71bf9c45faa0148aaa (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 8a4f50edddd9740742562b3f81ea2f5880eaf093
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Thu Aug 13 08:27:34 2020 -0700
Add some interrupt checking in MakeValid loop, references https://trac.osgeo.org/postgis/ticket/4582
diff --git a/src/operation/valid/MakeValid.cpp b/src/operation/valid/MakeValid.cpp
index eaa10e9..8807432 100644
--- a/src/operation/valid/MakeValid.cpp
+++ b/src/operation/valid/MakeValid.cpp
@@ -21,6 +21,7 @@
#include <geos/operation/valid/MakeValid.h>
#include <geos/operation/valid/IsValidOp.h>
+
#include <geos/operation/overlay/OverlayOp.h>
#include <geos/operation/polygonize/BuildArea.h>
#include <geos/operation/union/UnaryUnionOp.h>
@@ -33,9 +34,11 @@
#include <geos/geom/Polygon.h>
#include <geos/geom/MultiLineString.h>
#include <geos/geom/MultiPolygon.h>
+#include <geos/util/Interrupt.h>
#include <geos/util/UniqueCoordinateArrayFilter.h>
#include <geos/util/UnsupportedOperationException.h>
+
// std
#include <cassert>
#include <algorithm>
@@ -231,6 +234,8 @@ static std::unique_ptr<geom::Geometry> MakeValidPoly(const geom::Geometry* geom)
*/
while( cut_edges->getNumGeometries() ) {
+ GEOS_CHECK_FOR_INTERRUPTS();
+
// ASSUMPTION: cut_edges should already be fully noded
auto new_area = geos::operation::polygonize::BuildArea().build(cut_edges.get());
assert(new_area); // never return nullptr, but exception
@@ -248,6 +253,8 @@ static std::unique_ptr<geom::Geometry> MakeValidPoly(const geom::Geometry* geom)
std::unique_ptr<geom::Geometry> symdif = makeValidSymDifference(area.get(), new_area.get());
assert(symdif);
+ GEOS_CHECK_FOR_INTERRUPTS();
+
area = std::move(symdif);
/*
-----------------------------------------------------------------------
Summary of changes:
src/operation/valid/MakeValid.cpp | 7 +++++++
1 file changed, 7 insertions(+)
hooks/post-receive
--
GEOS
More information about the geos-commits
mailing list