[geos-commits] [SCM] GEOS branch main updated. 2c8e04faf8235456b417979bcf23271ef34148a7
git at osgeo.org
git at osgeo.org
Thu Nov 5 06:11:15 PST 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 2c8e04faf8235456b417979bcf23271ef34148a7 (commit)
from fc3eca9063096a665700651d6523f56de4dae415 (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 2c8e04faf8235456b417979bcf23271ef34148a7
Author: Daniel Baston <dbaston at gmail.com>
Date: Thu Nov 5 09:10:33 2026 -0500
AdjacentEdgeLocator: Avoid checking empty rings (#1590)
Resolves https://github.com/libgeos/geos/issues/1585
diff --git a/src/operation/relateng/AdjacentEdgeLocator.cpp b/src/operation/relateng/AdjacentEdgeLocator.cpp
index aeb5f8084..fa63f4fc9 100644
--- a/src/operation/relateng/AdjacentEdgeLocator.cpp
+++ b/src/operation/relateng/AdjacentEdgeLocator.cpp
@@ -133,6 +133,10 @@ AdjacentEdgeLocator::addRings(const Geometry* geom)
void
AdjacentEdgeLocator::addRing(const LinearRing* ring, bool requireCW)
{
+ if (ring->isEmpty()) {
+ return;
+ }
+
//TODO: remove repeated points?
const CoordinateSequence* pts = ring->getCoordinatesRO();
bool isFlipped = requireCW == Orientation::isCCW(pts);
diff --git a/tests/unit/operation/relateng/RelateNGTest.cpp b/tests/unit/operation/relateng/RelateNGTest.cpp
index ee8d3a841..8c7860577 100644
--- a/tests/unit/operation/relateng/RelateNGTest.cpp
+++ b/tests/unit/operation/relateng/RelateNGTest.cpp
@@ -925,5 +925,17 @@ void object::test<64> ()
checkRelate(b, a, "102F01FF2");
}
+template<>
+template<>
+void object::test<65>()
+{
+ set_test_name("GeometryCollection with empty polygon");
-} // namespace tut
+ std::string a = "POINT (1 0.5)";
+ std::string b = "GEOMETRYCOLLECTION (POLYGON ((1 0, 1 1, 0 1, 0 0, 1 0)), POLYGON ((2 0, 2 1, 1 1, 1 0, 2 0)), POLYGON EMPTY)";
+
+ checkIntersectsDisjoint(a, b, true);
+}
+
+
+} // namespace tut
\ No newline at end of file
-----------------------------------------------------------------------
Summary of changes:
src/operation/relateng/AdjacentEdgeLocator.cpp | 4 ++++
tests/unit/operation/relateng/RelateNGTest.cpp | 14 +++++++++++++-
2 files changed, 17 insertions(+), 1 deletion(-)
hooks/post-receive
--
GEOS
More information about the geos-commits
mailing list