[geos-commits] [SCM] GEOS branch 3.11 updated. 462f5c969f31a7ed99c9a81c31cc26deea4b32f5

git at osgeo.org git at osgeo.org
Tue Jun 27 08:30:57 PDT 2023


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.11 has been updated
       via  462f5c969f31a7ed99c9a81c31cc26deea4b32f5 (commit)
      from  ad62ddf5d97beecc193756c99f6c076963d36536 (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 462f5c969f31a7ed99c9a81c31cc26deea4b32f5
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Mon Jun 19 14:56:08 2023 -0700

    Catch Mixed-Dimension case and handle

diff --git a/src/geom/HeuristicOverlay.cpp b/src/geom/HeuristicOverlay.cpp
index c5cbbff01..d3cf9ee05 100644
--- a/src/geom/HeuristicOverlay.cpp
+++ b/src/geom/HeuristicOverlay.cpp
@@ -424,6 +424,14 @@ HeuristicOverlay(const Geometry* g0, const Geometry* g1, int opCode)
     catch(const geos::util::TopologyException& ex) {
         ::geos::ignore_unused_variable_warning(ex);
 
+#if GEOS_DEBUG_HEURISTICOVERLAY
+        std::cerr << "OverlayNGRobust: " << ex.what() << std::endl;
+#endif
+    }
+
+    catch(const geos::util::IllegalArgumentException& ex) {
+        ::geos::ignore_unused_variable_warning(ex);
+
 #if GEOS_DEBUG_HEURISTICOVERLAY
         std::cerr << "OverlayNGRobust: " << ex.what() << std::endl;
 #endif
diff --git a/tests/unit/geom/Geometry/differenceTest.cpp b/tests/unit/geom/Geometry/differenceTest.cpp
index 51a834c82..0b0b0f171 100644
--- a/tests/unit/geom/Geometry/differenceTest.cpp
+++ b/tests/unit/geom/Geometry/differenceTest.cpp
@@ -56,5 +56,26 @@ void object::test<1>
     ensure_equals_geometry(expected.get(), result.get());
 }
 
+// https://github.com/libgeos/geos/issues/924
+template<>
+template<>
+void object::test<2>
+()
+{
+    std::string wkt1("GEOMETRYCOLLECTION(POLYGON((0 0, 10 0, 10 10, 0 10, 0 0)), LINESTRING(20 20, 30 30))");
+    std::unique_ptr<geos::geom::Geometry> g1(wktreader.read(wkt1));
+
+    std::string wkt2("GEOMETRYCOLLECTION(POLYGON((9 9, 21 9, 21 21, 9 21, 9 9)), POINT(5 5))");
+    std::unique_ptr<geos::geom::Geometry> g2(wktreader.read(wkt2));
+
+    auto result = g1->difference(g2.get());
+    result->normalize();
+
+    std::string wktExpected("GEOMETRYCOLLECTION (LINESTRING (21 21, 30 30), POLYGON ((10 0, 0 0, 0 10, 9 10, 9 9, 10 9, 10 0)))");
+    std::unique_ptr<geos::geom::Geometry> expected(wktreader.read(wktExpected));
+
+    ensure_equals_geometry(expected.get(), result.get());
+}
+
 
 } // namespace tut

-----------------------------------------------------------------------

Summary of changes:
 src/geom/HeuristicOverlay.cpp               |  8 ++++++++
 tests/unit/geom/Geometry/differenceTest.cpp | 21 +++++++++++++++++++++
 2 files changed, 29 insertions(+)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list