[geos-commits] [SCM] GEOS branch main updated. e50b5af9cda259a528ae873cc2cc106d3cd30f1f

git at osgeo.org git at osgeo.org
Fri Jun 6 13:49:18 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  e50b5af9cda259a528ae873cc2cc106d3cd30f1f (commit)
      from  f2c2865060c33aee85c8411b909acc822382c95b (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 e50b5af9cda259a528ae873cc2cc106d3cd30f1f
Author: Martin Davis <mtnclimb at gmail.com>
Date:   Fri Jun 6 13:48:41 2025 -0700

    Add geosop coverageClean

diff --git a/util/geosop/GeometryOp.cpp b/util/geosop/GeometryOp.cpp
index 986d1856a..2e6d65f97 100644
--- a/util/geosop/GeometryOp.cpp
+++ b/util/geosop/GeometryOp.cpp
@@ -44,6 +44,7 @@
 #include <geos/operation/buffer/OffsetCurve.h>
 #include <geos/operation/cluster/GeometryDistanceClusterFinder.h>
 #include <geos/operation/cluster/GeometryIntersectsClusterFinder.h>
+#include <geos/coverage/CoverageCleaner.h>
 #include <geos/coverage/CoverageSimplifier.h>
 #include <geos/coverage/CoverageValidator.h>
 #include <geos/operation/linemerge/LineMerger.h>
@@ -963,6 +964,20 @@ std::vector<GeometryOpCreator> opRegistry {
 
 //=============  category: Polygonal Coverage  ==================
 
+{"coverageClean", [](std::string name) { return GeometryOp::createAgg(name,
+    catCoverage, "cleans a coverage, merging gaps narrower than a given width",
+    [](const Geometry& geom, double gapWidth) {
+        std::vector<const Geometry*> coverage = toList(geom);
+        std::vector<std::unique_ptr<Geometry>> result
+            = geos::coverage::CoverageCleaner::cleanGapWidth(coverage, gapWidth);;
+        //-- convert list type (be nice to avoid this)
+        std::vector<std::unique_ptr<const Geometry>> resultList;
+        for (std::size_t i = 0; i < result.size(); i++) {
+            resultList.emplace_back( std::move(result[i]) );
+        }
+        return new Result( std::move(resultList) );
+    });
+}},
 {"coverageSimplify", [](std::string name) { return GeometryOp::createAgg(name,
     catCoverage, "simplify a polygonal coverage by a distance tolerance",
     [](const Geometry& geom, double d) {

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

Summary of changes:
 util/geosop/GeometryOp.cpp | 15 +++++++++++++++
 1 file changed, 15 insertions(+)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list