[geos-commits] [SCM] GEOS branch 3.12 updated. 00f58ef16b97cee425bf8e08f386723aa4165a23
git at osgeo.org
git at osgeo.org
Fri May 30 15:27:04 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, 3.12 has been updated
via 00f58ef16b97cee425bf8e08f386723aa4165a23 (commit)
via db17bc38ab33ef9c2eb337a994c5936591709cd4 (commit)
from 0aef237c159ad9c92857134af0831e7f03a3b276 (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 00f58ef16b97cee425bf8e08f386723aa4165a23
Author: Martin Davis <mtnclimb at gmail.com>
Date: Fri May 30 15:26:42 2025 -0700
Update NEWS
diff --git a/NEWS.md b/NEWS.md
index d3e916e2f..de09ec652 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -4,6 +4,7 @@
- Fixes:
- Fix OverlayNG coordinate dimemsion handling for EMPTY geometries (GH-1258, Martin Davis)
- Fix DepthSegment comparison logic (really this time) (GH-1266, Martin Davis)
+ - Change CoverageGapFinder to return polygons (Martin Davis)
## Changes in 3.12.3
2025-03-03
commit db17bc38ab33ef9c2eb337a994c5936591709cd4
Author: Martin Davis <mtnclimb at gmail.com>
Date: Fri May 30 15:21:39 2025 -0700
Change CoverageGapFinder to return polygons
diff --git a/src/coverage/CoverageGapFinder.cpp b/src/coverage/CoverageGapFinder.cpp
index b4de0fc50..3cd6b6583 100644
--- a/src/coverage/CoverageGapFinder.cpp
+++ b/src/coverage/CoverageGapFinder.cpp
@@ -47,7 +47,6 @@ CoverageGapFinder::findGaps(std::vector<const Geometry*>& coverage, double gapWi
return finder.findGaps(gapWidth);
}
-
/* public */
std::unique_ptr<Geometry>
CoverageGapFinder::findGaps(double gapWidth)
@@ -56,21 +55,21 @@ CoverageGapFinder::findGaps(double gapWidth)
std::vector<const Polygon*> polygons;
PolygonExtracter::getPolygons(*geomUnion, polygons);
- std::vector<std::unique_ptr<LineString>> gapLines;
+ std::vector<std::unique_ptr<Geometry>> gapLines;
for (const Polygon* poly : polygons) {
for (std::size_t i = 0; i < poly->getNumInteriorRing(); i++) {
const LinearRing* hole = poly->getInteriorRingN(i);
if (isGap(hole, gapWidth)) {
- auto pts = hole->getCoordinatesRO()->clone();
- auto ls = geomUnion->getFactory()->createLineString(std::move(pts));
- gapLines.emplace_back(ls.release());
+ //auto pts = hole->getCoordinatesRO()->clone();
+ //auto ls = geomUnion->getFactory()->createLineString(std::move(pts));
+ auto polygon = geomUnion->getFactory()->createPolygon(hole->clone());
+ gapLines.emplace_back(polygon.release());
}
}
}
return geomUnion->getFactory()->buildGeometry(std::move(gapLines));
}
-
/* private */
bool
CoverageGapFinder::isGap(const LinearRing* hole, double gapWidth)
diff --git a/tests/unit/coverage/CoverageGapFinderTest.cpp b/tests/unit/coverage/CoverageGapFinderTest.cpp
index 5a345e18a..2c25c4c2c 100644
--- a/tests/unit/coverage/CoverageGapFinderTest.cpp
+++ b/tests/unit/coverage/CoverageGapFinderTest.cpp
@@ -69,7 +69,7 @@ void object::test<1> ()
checkGaps(
"MULTIPOLYGON (((1 5, 1 9, 5 9, 5 6, 3 5, 1 5)), ((5 9, 9 9, 9 5, 7 5, 5 6, 5 9)), ((1 1, 1 5, 3 5, 7 5, 9 5, 9 1, 1 1)))",
1,
- "LINESTRING (3 5, 7 5, 5 6, 3 5)"
+ "POLYGON ((3 5, 7 5, 5 6, 3 5))"
);
}
-----------------------------------------------------------------------
Summary of changes:
NEWS.md | 1 +
src/coverage/CoverageGapFinder.cpp | 11 +++++------
tests/unit/coverage/CoverageGapFinderTest.cpp | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
hooks/post-receive
--
GEOS
More information about the geos-commits
mailing list