[geos-commits] [SCM] GEOS branch main updated. 9cccf277d788e6326ca2dbb6d2d928941f211b97
git at osgeo.org
git at osgeo.org
Thu Jul 9 17:51:08 PDT 2026
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, main has been updated
via 9cccf277d788e6326ca2dbb6d2d928941f211b97 (commit)
via bf1980bed13ebb05fac0cff5e1f75e91a33c967d (commit)
via d4fb3df21da6ec42792409f7e7269ef4a8abe6b2 (commit)
from 6354193e908802263057d0ef8dcd3689f6c99a4a (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 9cccf277d788e6326ca2dbb6d2d928941f211b97
Author: Daniel Baston <dbaston at gmail.com>
Date: Thu Jul 9 13:51:37 2026 -0400
EdgeNodingBuilder: avoid clipping linear rings of a CurvePolygon
diff --git a/src/operation/overlayng/EdgeNodingBuilder.cpp b/src/operation/overlayng/EdgeNodingBuilder.cpp
index ded0c128b..b0818bce9 100644
--- a/src/operation/overlayng/EdgeNodingBuilder.cpp
+++ b/src/operation/overlayng/EdgeNodingBuilder.cpp
@@ -375,9 +375,12 @@ EdgeNodingBuilder::clip(const LineString* ring) const
/**
* If no clipper or ring is completely contained then no need to clip.
+ * We also cannot clip if any input contains curves, because curved
+ * rings are not currently clipped and clipping only some rings could
+ * disrupt the polygon topology.
* But repeated points must be removed to ensure correct noding.
*/
- if (clipper == nullptr || clipEnv->covers(env)) {
+ if (clipper == nullptr || clipEnv->covers(env) || inputHasCurves) {
return removeRepeatedPoints(ring);
}
diff --git a/tests/xmltester/tests/general/TestOverlayCurvesAA.xml b/tests/xmltester/tests/general/TestOverlayCurvesAA.xml
new file mode 100644
index 000000000..0629b027f
--- /dev/null
+++ b/tests/xmltester/tests/general/TestOverlayCurvesAA.xml
@@ -0,0 +1,16 @@
+<run>
+ <case>
+ <desc>AA - A with hole intersecting B</desc>
+ <a>
+ CURVEPOLYGON((20 20, 20 160, 160 160, 160 20, 20 20), COMPOUNDCURVE ( CIRCULARSTRING (140 40, 115 115, 40 140), (40 140, 40 40, 140 40)))
+ </a>
+ <b>
+ POLYGON((80 100, 220 100, 220 240, 80 240, 80 100))
+ </b>
+ <test>
+ <op name="intersection" arg1="A" arg2="B">
+ CURVEPOLYGON (COMPOUNDCURVE ((80 136.50148808205722, 80 160), (80 160, 160 160, 160 100, 127.04025757937788 100), CIRCULARSTRING (127.04025757937788 100, 106.68619012043186 122.3309157911624, 80 136.50148808205722)))
+ </op>
+ </test>
+ </case>
+</run>
commit bf1980bed13ebb05fac0cff5e1f75e91a33c967d
Author: Daniel Baston <dbaston at gmail.com>
Date: Thu Jul 9 10:30:16 2026 -0400
XMLTester: support curved geometries
diff --git a/tests/xmltester/XMLTester.cpp b/tests/xmltester/XMLTester.cpp
index 01803404b..16b1690aa 100644
--- a/tests/xmltester/XMLTester.cpp
+++ b/tests/xmltester/XMLTester.cpp
@@ -510,28 +510,10 @@ XMLTester::parseGeometry(const std::string& in, const char* label)
std::unique_ptr<geom::Geometry> ret;
- switch(first_char) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- case 'A':
- case 'B':
- case 'C':
- case 'D':
- case 'E':
- case 'F':
+ if (first_char == '0') {
ret = wkbreader->readHEX(is);
- break;
- default:
+ } else {
ret = wktreader->read(in);
- break;
}
if(testValidInput) {
@@ -690,16 +672,20 @@ bool
Test::checkOverlaySuccess(Geometry const& gExpected, Geometry const& gActual)
{
double tol = operation::overlay::snap::GeometrySnapper::computeSizeBasedSnapTolerance(gExpected);
- //-- BUG: this allows all empties to test equal
- if(gExpected.equals(&gActual)) {
- return 1;
+
+ if (!gExpected.hasCurvedComponents()) {
+ //-- BUG: this allows all empties to test equal
+ if(gExpected.equals(&gActual)) {
+ return true;
+ }
}
+
//TODO: is this needed by any tests?
std::cerr << "Using an overlay tolerance of " << tol << std::endl;
if(gExpected.equalsExact(&gActual, tol)) {
- return 1;
+ return true;
}
- return 0;
+ return false;
}
/* static */
commit d4fb3df21da6ec42792409f7e7269ef4a8abe6b2
Author: Daniel Baston <dbaston at gmail.com>
Date: Thu Jul 9 10:29:01 2026 -0400
OverlayNG: improve exception message on curved geometry failure
diff --git a/src/operation/overlayng/OverlayNGRobust.cpp b/src/operation/overlayng/OverlayNGRobust.cpp
index 3e8da6f9d..bca5e6e44 100644
--- a/src/operation/overlayng/OverlayNGRobust.cpp
+++ b/src/operation/overlayng/OverlayNGRobust.cpp
@@ -120,6 +120,10 @@ OverlayNGRobust::Overlay(const Geometry* geom0, const Geometry* geom1, int opCod
return result;
}
catch (const std::runtime_error &ex) {
+ if (geom0->hasCurvedComponents() || geom1->hasCurvedComponents()) {
+ // Snapping strategies do not support curved geometries.
+ throw;
+ }
/**
* Capture original exception,
* so it can be rethrown if the remaining strategies all fail.
@@ -130,6 +134,7 @@ OverlayNGRobust::Overlay(const Geometry* geom0, const Geometry* geom1, int opCod
#endif
}
+
/**
* On failure retry using snapping noding with a "safe" tolerance.
* if this throws an exception just let it go,
-----------------------------------------------------------------------
Summary of changes:
src/operation/overlayng/EdgeNodingBuilder.cpp | 5 ++-
src/operation/overlayng/OverlayNGRobust.cpp | 5 +++
tests/xmltester/XMLTester.cpp | 36 +++++++---------------
.../tests/general/TestOverlayCurvesAA.xml | 16 ++++++++++
4 files changed, 36 insertions(+), 26 deletions(-)
create mode 100644 tests/xmltester/tests/general/TestOverlayCurvesAA.xml
hooks/post-receive
--
GEOS
More information about the geos-commits
mailing list