[geos-commits] [SCM] GEOS branch 3.13 updated. 1d2f7a27e98237776e365c25e4ab7b2a34370ff9
git at osgeo.org
git at osgeo.org
Wed Mar 25 06:09:15 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, 3.13 has been updated
via 1d2f7a27e98237776e365c25e4ab7b2a34370ff9 (commit)
from 938dcf7d376144e8cdcde79a424feabff94ea413 (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 1d2f7a27e98237776e365c25e4ab7b2a34370ff9
Author: Daniel Baston <dbaston at gmail.com>
Date: Wed Mar 25 09:08:54 2026 -0400
GEOSNode: Avoid crash on collection with empty components (#1411)
diff --git a/src/noding/GeometryNoder.cpp b/src/noding/GeometryNoder.cpp
index 71ad91ea9..b8d773030 100644
--- a/src/noding/GeometryNoder.cpp
+++ b/src/noding/GeometryNoder.cpp
@@ -59,6 +59,10 @@ public:
void
filter_ro(const geom::Geometry* g) override
{
+ if (g->isEmpty()) {
+ return;
+ }
+
const geom::LineString* ls = dynamic_cast<const geom::LineString*>(g);
if(ls) {
auto coord = ls->getCoordinates();
diff --git a/tests/unit/capi/GEOSNodeTest.cpp b/tests/unit/capi/GEOSNodeTest.cpp
index 9b11e1a15..a4c715710 100644
--- a/tests/unit/capi/GEOSNodeTest.cpp
+++ b/tests/unit/capi/GEOSNodeTest.cpp
@@ -213,5 +213,17 @@ void object::test<9>()
ensure("curved geometries not supported", result_ == nullptr);
}
+template<>
+template<>
+void object::test<17>()
+{
+ set_test_name("GeometryCollection with empty element");
+
+ input_ = fromWKT("GEOMETRYCOLLECTION (POLYGON EMPTY, POLYGON ((0 0, 1 1, 0 1, 0 0)))");
+
+ result_ = GEOSNode(input_);
+ ensure(result_);
+}
+
} // namespace tut
-----------------------------------------------------------------------
Summary of changes:
src/noding/GeometryNoder.cpp | 4 ++++
tests/unit/capi/GEOSNodeTest.cpp | 12 ++++++++++++
2 files changed, 16 insertions(+)
hooks/post-receive
--
GEOS
More information about the geos-commits
mailing list