[geos-commits] [SCM] GEOS branch main updated. 3cee790e4d6f87feb09864b1941cce6b3fb7fbaf
git at osgeo.org
git at osgeo.org
Tue Apr 7 07:41:07 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, main has been updated
via 3cee790e4d6f87feb09864b1941cce6b3fb7fbaf (commit)
from 52dc9337bc485361adfa0e3e0f0c135ceb4ccbdd (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 3cee790e4d6f87feb09864b1941cce6b3fb7fbaf
Author: Daniel Baston <dbaston at gmail.com>
Date: Tue Apr 7 10:40:47 2026 -0400
OverlayEdge: Avoid unintended ring rotation (#1412)
diff --git a/src/operation/overlayng/OverlayEdge.cpp b/src/operation/overlayng/OverlayEdge.cpp
index 8716e1503..31992b881 100644
--- a/src/operation/overlayng/OverlayEdge.cpp
+++ b/src/operation/overlayng/OverlayEdge.cpp
@@ -55,7 +55,7 @@ OverlayEdge::getCoordinatesOriented() const
void
OverlayEdge::addCoordinates(CoordinateSequence* coords) const
{
- bool isFirstEdge = coords->size() > 0;
+ const bool isFirstEdge = coords->isEmpty();
if (direction) {
std::size_t startIndex = 1;
if (isFirstEdge) {
diff --git a/tests/unit/capi/GEOSGeom_setPrecisionTest.cpp b/tests/unit/capi/GEOSGeom_setPrecisionTest.cpp
index 4c604a183..2c70f84d3 100644
--- a/tests/unit/capi/GEOSGeom_setPrecisionTest.cpp
+++ b/tests/unit/capi/GEOSGeom_setPrecisionTest.cpp
@@ -333,12 +333,10 @@ void object::test<24>()
// https://github.com/libgeos/geos/issues/1365{
set_test_name("M value retained on last point");
- input_ = fromWKT("POLYGON ZM ((0 0 0 0, 0 1 1 1, 1 1 2 3, 1 0 4 5, 0 0 6 7))");
- expected_ = fromWKT("POLYGON ZM ((0 1 1 1, 1 1 2 3, 1 0 4 5, 0 0 6 7, 0 1 1 1))");
-
+ input_ = fromWKT("POLYGON ZM ((0 0 6 7, 0 1 1 1, 1 1 2 3, 1 0 4 5, 0 0 6 7))");
result_ = GEOSGeom_setPrecision(input_, 0.1, 0);
- ensure(GEOSEqualsIdentical(result_, expected_));
+ ensure_geometry_equals_identical(result_, input_);
}
} // namespace tut
diff --git a/tests/unit/capi/GEOSMakeValidTest.cpp b/tests/unit/capi/GEOSMakeValidTest.cpp
index 0cad2e552..44ec52c84 100644
--- a/tests/unit/capi/GEOSMakeValidTest.cpp
+++ b/tests/unit/capi/GEOSMakeValidTest.cpp
@@ -125,7 +125,8 @@ void object::test<7>()
ensure(input_);
result_ = GEOSMakeValid(input_);
- expected_ = fromWKT("MULTIPOLYGON ZM (((0 0 1 2, 0.5 0.5 2.5 3.5, 1 0 2 3, 0 0 1 2)), ((1 1 4 5, 0.5 0.5 2.5 3.5, 0 1 3 4, 1 1 4 5)))");
+ expected_ = fromWKT("MULTIPOLYGON ZM (((0.5 0.5 2.5 3.5, 1 0 2 3, 0 0 1 2, 0.5 0.5 2.5 3.5)), ((0.5 0.5 2.5 3.5, 0 1 3 4, 1 1 4 5, 0.5 0.5 2.5 3.5)))");
+
ensure_geometry_equals_identical(result_, expected_);
}
diff --git a/tests/unit/capi/GEOSSubdivideByGridTest.cpp b/tests/unit/capi/GEOSSubdivideByGridTest.cpp
index d734c5bca..fc4398fb6 100644
--- a/tests/unit/capi/GEOSSubdivideByGridTest.cpp
+++ b/tests/unit/capi/GEOSSubdivideByGridTest.cpp
@@ -50,7 +50,7 @@ void object::test<2>()
result_ = GEOSSubdivideByGrid(input_, 1, 0, 5, 3, 4, 3, true);
- ensure_geometry_equals_identical(expected_, result_);
+ ensure_geometry_equals(expected_, result_);
}
}
\ No newline at end of file
-----------------------------------------------------------------------
Summary of changes:
src/operation/overlayng/OverlayEdge.cpp | 2 +-
tests/unit/capi/GEOSGeom_setPrecisionTest.cpp | 6 ++----
tests/unit/capi/GEOSMakeValidTest.cpp | 3 ++-
tests/unit/capi/GEOSSubdivideByGridTest.cpp | 2 +-
4 files changed, 6 insertions(+), 7 deletions(-)
hooks/post-receive
--
GEOS
More information about the geos-commits
mailing list