[geos-commits] [SCM] GEOS branch 3.12 updated. a8df87a0ff1989e8b3b088e25785ee7a0e4769a6
git at osgeo.org
git at osgeo.org
Wed Mar 25 06:08: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.12 has been updated
via a8df87a0ff1989e8b3b088e25785ee7a0e4769a6 (commit)
from 19857cafbc79e8e9d35154ff1b709ab5d61e14ae (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 a8df87a0ff1989e8b3b088e25785ee7a0e4769a6
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 144d1f306..7ac2a0617 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 abda612bb..8c1da4f5f 100644
--- a/tests/unit/capi/GEOSNodeTest.cpp
+++ b/tests/unit/capi/GEOSNodeTest.cpp
@@ -201,5 +201,17 @@ void object::test<8>
GEOSFree(wkt_expected);
}
+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