[geos-commits] [SCM] GEOS branch main updated. df6780c9064909f7a6825e3a798ce56da7394762
git at osgeo.org
git at osgeo.org
Fri Aug 8 17:32:24 PDT 2025
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, main has been updated
via df6780c9064909f7a6825e3a798ce56da7394762 (commit)
from a721f7d4bdf82f00aea13137cac1796d8338dfde (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 df6780c9064909f7a6825e3a798ce56da7394762
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Fri Aug 8 17:31:50 2025 -0700
Return a more descriptive error in the exception for CoverageUnion
diff --git a/src/operation/overlayng/CoverageUnion.cpp b/src/operation/overlayng/CoverageUnion.cpp
index 3d860c92a..05cd4d0b3 100644
--- a/src/operation/overlayng/CoverageUnion.cpp
+++ b/src/operation/overlayng/CoverageUnion.cpp
@@ -43,7 +43,14 @@ CoverageUnion::geomunion(const Geometry* coverage)
}
else {
BoundaryChainNoder bcn;
- result = OverlayNG::geomunion(coverage, nullptr, &bcn);
+ // https://github.com/libgeos/geos/pull/1279#discussion_r2256157484
+ // return a more descriptive exception error
+ try {
+ result = OverlayNG::geomunion(coverage, nullptr, &bcn);
+ }
+ catch (const geos::util::TopologyException& te) {
+ throw geos::util::TopologyException("CoverageUnion cannot process incorrectly noded inputs");
+ }
}
double area_in = coverage->getArea();
diff --git a/tests/unit/capi/GEOSCoverageUnionTest.cpp b/tests/unit/capi/GEOSCoverageUnionTest.cpp
index 59fe3357a..1e0d7d67d 100644
--- a/tests/unit/capi/GEOSCoverageUnionTest.cpp
+++ b/tests/unit/capi/GEOSCoverageUnionTest.cpp
@@ -69,18 +69,8 @@ void object::test<2>
auto input = GEOSWKTReader_read(m_reader,
"GEOMETRYCOLLECTION(POLYGON ((0 0, 0 1, 1 1, 1 0, 0 0)), POLYGON ((1 0, 0.9 1, 2 1, 2 0, 1 0)))");
- // auto input = GEOSGeom_createCollection(GEOS_GEOMETRYCOLLECTION, geoms, 2);
- // Temporary, wrap in a try/catch block until JTS upstream issue is fixed.
- try {
- auto result = GEOSCoverageUnion(input);
- ensure( result != nullptr );
- ensure( GEOSEquals(input, result) );
- GEOSGeom_destroy(result);
- }
- catch(std::exception& e) {
- (void)0;
- }
-
+ auto result = GEOSCoverageUnion(input);
+ ensure( result == nullptr );
GEOSGeom_destroy(input);
}
-----------------------------------------------------------------------
Summary of changes:
src/operation/overlayng/CoverageUnion.cpp | 9 ++++++++-
tests/unit/capi/GEOSCoverageUnionTest.cpp | 14 ++------------
2 files changed, 10 insertions(+), 13 deletions(-)
hooks/post-receive
--
GEOS
More information about the geos-commits
mailing list