[geos-commits] [SCM] GEOS branch 3.14 updated. 03d50b54fd00017c74d34ba44a4378440a185061
git at osgeo.org
git at osgeo.org
Wed Mar 25 05:58:27 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.14 has been updated
via 03d50b54fd00017c74d34ba44a4378440a185061 (commit)
from a2e484ca26a8c2a896452f0d8247c4b83e08f4e2 (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 03d50b54fd00017c74d34ba44a4378440a185061
Author: Daniel Baston <dbaston at gmail.com>
Date: Wed Mar 25 08:51:17 2026 -0400
GEOSNode: Avoid crash on collection with empty components
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 41324bda5..4c315e307 100644
--- a/tests/unit/capi/GEOSNodeTest.cpp
+++ b/tests/unit/capi/GEOSNodeTest.cpp
@@ -208,5 +208,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