[geos-commits] [SCM] GEOS branch main updated. 9d8250fc8d94e8fd48698af7086d94a3b3020ec6
git at osgeo.org
git at osgeo.org
Wed Aug 12 09:12:16 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 9d8250fc8d94e8fd48698af7086d94a3b3020ec6 (commit)
from 383e122c769f1fdaa31f93c12b97115a70085a85 (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 9d8250fc8d94e8fd48698af7086d94a3b3020ec6
Author: Daniel Baston <dbaston at gmail.com>
Date: Wed Aug 12 12:11:58 2026 -0400
CircularString::normalizeClosed: avoid selecting control point as start point (#1506)
diff --git a/src/geom/CircularString.cpp b/src/geom/CircularString.cpp
index 4eeb941de..400094df8 100644
--- a/src/geom/CircularString.cpp
+++ b/src/geom/CircularString.cpp
@@ -126,7 +126,7 @@ CircularString::normalizeClosed() {
std::size_t minInd = 0;
const CoordinateXY* minPt = &ringCoords->getAt<CoordinateXY>(minInd);
- for (std::size_t i = 2; i < ringCoords->size() - 2; i++) {
+ for (std::size_t i = 2; i < ringCoords->size() - 2; i += 2) {
const CoordinateXY& pt = ringCoords->getAt<CoordinateXY>(i);
if (pt.compareTo(*minPt) < 0) {
minInd = i;
diff --git a/tests/unit/geom/Geometry/normalizeTest.cpp b/tests/unit/geom/Geometry/normalizeTest.cpp
index 9ad06928a..d431e9bb9 100644
--- a/tests/unit/geom/Geometry/normalizeTest.cpp
+++ b/tests/unit/geom/Geometry/normalizeTest.cpp
@@ -264,6 +264,17 @@ void object::test<11>
"LINESTRING M (0 0 3, 0 100 2, 100 100 1, 100 0 0)");
}
+template<>
+template<>
+void object::test<12>
+()
+{
+ set_test_name("closed CircularString");
+
+ runTest("CIRCULARSTRING (120 152.3864417907085, 109.7594383790319 155.56129134453136, 100 160, 90 190, 100 220, 109.7594383790319 224.43870865546864, 120 227.6135582092915, 150.70007323113106 229.3238307529279, 180 220, 190 190, 180 160, 150.70007323113106 150.6761692470721, 120 152.3864417907085)",
+ "CIRCULARSTRING (100 160, 90 190, 100 220, 109.7594383790319 224.43870865546864, 120 227.6135582092915, 150.70007323113106 229.3238307529279, 180 220, 190 190, 180 160, 150.70007323113106 150.6761692470721, 120 152.3864417907085, 109.7594383790319 155.56129134453136, 100 160)");
+}
+
} // namespace tut
-----------------------------------------------------------------------
Summary of changes:
src/geom/CircularString.cpp | 2 +-
tests/unit/geom/Geometry/normalizeTest.cpp | 11 +++++++++++
2 files changed, 12 insertions(+), 1 deletion(-)
hooks/post-receive
--
GEOS
More information about the geos-commits
mailing list