[geos-commits] [SCM] GEOS branch main updated. 45466da4c847a2e4e52eeb81732b26986645730b
git at osgeo.org
git at osgeo.org
Tue Feb 6 16:06:17 PST 2024
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 45466da4c847a2e4e52eeb81732b26986645730b (commit)
from 7a9d6caaa9f9b3e8fcbad6bfaf9e5b5ac43aeafe (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 45466da4c847a2e4e52eeb81732b26986645730b
Author: Even Rouault <even.rouault at spatialys.com>
Date: Wed Feb 7 01:05:59 2024 +0100
CoverageSimplifier: make input coverage vector const (fixing a TODO) (#1041)
diff --git a/include/geos/coverage/CoverageRingEdges.h b/include/geos/coverage/CoverageRingEdges.h
index d43279310..d6014c2d3 100644
--- a/include/geos/coverage/CoverageRingEdges.h
+++ b/include/geos/coverage/CoverageRingEdges.h
@@ -61,7 +61,7 @@ class GEOS_DLL CoverageRingEdges {
private:
// Members
- std::vector<const Geometry*>& m_coverage;
+ const std::vector<const Geometry*>& m_coverage;
std::map<const LinearRing*, std::vector<CoverageEdge*>> m_ringEdgesMap;
std::vector<CoverageEdge*> m_edges;
std::vector<std::unique_ptr<CoverageEdge>> m_edgeStore;
@@ -72,7 +72,7 @@ private:
public:
- CoverageRingEdges(std::vector<const Geometry*>& coverage)
+ CoverageRingEdges(const std::vector<const Geometry*>& coverage)
: m_coverage(coverage)
{
build();
@@ -140,7 +140,7 @@ private:
const CoordinateSequence& ring);
Coordinate::UnorderedSet findMultiRingNodes(
- std::vector<const Geometry*>& coverage);
+ const std::vector<const Geometry*>& coverage);
Coordinate::UnorderedSet findBoundaryNodes(
LineSegment::UnorderedSet& lineSegments);
diff --git a/include/geos/coverage/CoverageSimplifier.h b/include/geos/coverage/CoverageSimplifier.h
index 11e8fa3d1..5e23028d3 100644
--- a/include/geos/coverage/CoverageSimplifier.h
+++ b/include/geos/coverage/CoverageSimplifier.h
@@ -83,7 +83,7 @@ public:
*
* @param coverage a set of polygonal geometries forming a coverage
*/
- CoverageSimplifier(std::vector<const Geometry*>& coverage);
+ CoverageSimplifier(const std::vector<const Geometry*>& coverage);
/**
* Simplifies the boundaries of a set of polygonal geometries forming a coverage,
@@ -142,7 +142,7 @@ public:
private:
// Members
- std::vector<const Geometry*>& m_input; // TODO? make this const
+ const std::vector<const Geometry*>& m_input;
const GeometryFactory* m_geomFactory;
// Methods
diff --git a/include/geos/coverage/VertexRingCounter.h b/include/geos/coverage/VertexRingCounter.h
index 3d1151cd4..a8899ae91 100644
--- a/include/geos/coverage/VertexRingCounter.h
+++ b/include/geos/coverage/VertexRingCounter.h
@@ -56,7 +56,7 @@ public:
void filter_ro(const CoordinateSequence& seq, std::size_t i) override;
static void count(
- std::vector<const Geometry*>& geoms,
+ const std::vector<const Geometry*>& geoms,
std::map<Coordinate, std::size_t>& counts);
private:
diff --git a/src/coverage/CoverageRingEdges.cpp b/src/coverage/CoverageRingEdges.cpp
index c334e47f5..bc6c34e9b 100644
--- a/src/coverage/CoverageRingEdges.cpp
+++ b/src/coverage/CoverageRingEdges.cpp
@@ -252,7 +252,7 @@ CoverageRingEdges::next(std::size_t index, const CoordinateSequence& ring)
/* private */
Coordinate::UnorderedSet
-CoverageRingEdges::findMultiRingNodes(std::vector<const Geometry*>& coverage)
+CoverageRingEdges::findMultiRingNodes(const std::vector<const Geometry*>& coverage)
{
std::map<Coordinate, std::size_t> vertexRingCount;
VertexRingCounter::count(coverage, vertexRingCount);
diff --git a/src/coverage/CoverageSimplifier.cpp b/src/coverage/CoverageSimplifier.cpp
index 335b10759..93d31d2ef 100644
--- a/src/coverage/CoverageSimplifier.cpp
+++ b/src/coverage/CoverageSimplifier.cpp
@@ -81,7 +81,7 @@ CoverageSimplifier::simplifyInner(
/* public */
-CoverageSimplifier::CoverageSimplifier(std::vector<const Geometry*>& coverage)
+CoverageSimplifier::CoverageSimplifier(const std::vector<const Geometry*>& coverage)
: m_input(coverage)
, m_geomFactory(coverage.empty() ? nullptr : coverage[0]->getFactory())
{
diff --git a/src/coverage/VertexRingCounter.cpp b/src/coverage/VertexRingCounter.cpp
index c0d79cab9..fe742889f 100644
--- a/src/coverage/VertexRingCounter.cpp
+++ b/src/coverage/VertexRingCounter.cpp
@@ -33,7 +33,7 @@ namespace coverage { // geos.coverage
/* public static */
void
VertexRingCounter::count(
- std::vector<const Geometry*>& geoms,
+ const std::vector<const Geometry*>& geoms,
std::map<Coordinate, std::size_t>& counts)
{
VertexRingCounter vertextCounter(counts);
-----------------------------------------------------------------------
Summary of changes:
include/geos/coverage/CoverageRingEdges.h | 6 +++---
include/geos/coverage/CoverageSimplifier.h | 4 ++--
include/geos/coverage/VertexRingCounter.h | 2 +-
src/coverage/CoverageRingEdges.cpp | 2 +-
src/coverage/CoverageSimplifier.cpp | 2 +-
src/coverage/VertexRingCounter.cpp | 2 +-
6 files changed, 9 insertions(+), 9 deletions(-)
hooks/post-receive
--
GEOS
More information about the geos-commits
mailing list