[geos-commits] [SCM] GEOS branch 3.9 updated. f781576e5ca5731ce40115894a93ac8229920d0a
git at osgeo.org
git at osgeo.org
Mon Mar 4 12:28:09 PST 2024
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.9 has been updated
via f781576e5ca5731ce40115894a93ac8229920d0a (commit)
from d1d221f0d412db83f606125f4625faaafcd6979e (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 f781576e5ca5731ce40115894a93ac8229920d0a
Author: Mike Taves <mwtoews at gmail.com>
Date: Tue Mar 5 09:27:36 2024 +1300
Fix overlay op regression with mixed GeometryCollection on 3.9 branch (#1050)
* Fix overlay op regression with mixed GeometryCollection on 3.9 branch
* Test overlay op with mixed GeometryCollection
diff --git a/NEWS b/NEWS
index 35958db05..195b7fa50 100644
--- a/NEWS
+++ b/NEWS
@@ -18,6 +18,7 @@ xxxx-xx-xx
- Remove undefined behaviour in use of null PrecisionModel (GH-931, Jeff Walton)
- Skip over testing empty distances for mixed collections (GH-979, Paul Ramsey)
- Add missing cstdint headers (GH-990, GH-743, Regina Obe, Sergei Trofimovich)
+ - HeuristicOverlay: Fix overlay op regression (GH-1050, Mike Taves)
## Changes in 3.9.4
diff --git a/src/geom/HeuristicOverlay.cpp b/src/geom/HeuristicOverlay.cpp
index 8806b9ebe..214cd3d3e 100644
--- a/src/geom/HeuristicOverlay.cpp
+++ b/src/geom/HeuristicOverlay.cpp
@@ -421,7 +421,8 @@ HeuristicOverlay(const Geometry* g0, const Geometry* g1, int opCode)
return ret;
}
- catch(const geos::util::TopologyException& ex) {
+ catch(const geos::util::IllegalArgumentException& ex) {
+ // Mixed GeometryCollection; see GH-1050
::geos::ignore_unused_variable_warning(ex);
#if GEOS_DEBUG_HEURISTICOVERLAY
diff --git a/tests/unit/capi/GEOSDifferenceTest.cpp b/tests/unit/capi/GEOSDifferenceTest.cpp
index b2ff86a2c..7abe8badc 100644
--- a/tests/unit/capi/GEOSDifferenceTest.cpp
+++ b/tests/unit/capi/GEOSDifferenceTest.cpp
@@ -40,5 +40,33 @@ void object::test<1>()
GEOSGeom_destroy(result);
}
+/**
+* Mixed GeometryCollection types permitted at a high-level
+*/
+template<>
+template<>
+void object::test<2>()
+{
+ GEOSGeometry* a = GEOSGeomFromWKT("GEOMETRYCOLLECTION (POINT (51 -1), LINESTRING (52 -1, 49 2))");
+ GEOSGeometry* b = GEOSGeomFromWKT("POINT (2 3)");
+
+ ensure(a);
+ ensure(b);
+
+ GEOSGeometry* ab = GEOSDifference(a, b);
+ GEOSGeometry* ba = GEOSDifference(b, a);
+
+ ensure(ab);
+ ensure(ba);
+
+ ensure_geometry_equals(ab, a);
+ ensure_geometry_equals(ba, b);
+
+ GEOSGeom_destroy(a);
+ GEOSGeom_destroy(b);
+ GEOSGeom_destroy(ab);
+ GEOSGeom_destroy(ba);
+}
+
} // namespace tut
-----------------------------------------------------------------------
Summary of changes:
NEWS | 1 +
src/geom/HeuristicOverlay.cpp | 3 ++-
tests/unit/capi/GEOSDifferenceTest.cpp | 28 ++++++++++++++++++++++++++++
3 files changed, 31 insertions(+), 1 deletion(-)
hooks/post-receive
--
GEOS
More information about the geos-commits
mailing list