[geos-commits] [SCM] GEOS branch master updated. dbdcd824f51704aa81cf3a17af972efbe6fef476
git at osgeo.org
git at osgeo.org
Tue Dec 11 10:37:03 PST 2018
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, master has been updated
via dbdcd824f51704aa81cf3a17af972efbe6fef476 (commit)
from a933403c3a16750a5ebefb57ecb96ba20b6ff8bc (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 dbdcd824f51704aa81cf3a17af972efbe6fef476
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Tue Dec 11 10:36:51 2018 -0800
Change coordinate list access to an iterator pattern
diff --git a/src/geom/util/Densifier.cpp b/src/geom/util/Densifier.cpp
index 832e3f4..11fd73b 100644
--- a/src/geom/util/Densifier.cpp
+++ b/src/geom/util/Densifier.cpp
@@ -107,10 +107,11 @@ Densifier::densifyPoints(const Coordinate::Vect pts, double distanceTolerance, c
geom::LineSegment seg;
geom::CoordinateList coordList;
geom::CoordinateList::iterator it = coordList.begin();
- for (int i = 0; i < pts.size()-1; i++)
+
+ for (Coordinate::Vect::const_iterator it=pts.begin(), itEnd=pts.end()-1; it < itEnd; ++it)
{
- seg.p0 = pts[i];
- seg.p1 = pts[i+1];
+ seg.p0 = *it;
+ seg.p1 = *(it+1);
coordList.insert(coordList.end(), seg.p0, false);
double len = seg.getLength();
int densifiedSegCount = (int) (len / distanceTolerance) + 1;
-----------------------------------------------------------------------
Summary of changes:
src/geom/util/Densifier.cpp | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
hooks/post-receive
--
GEOS
More information about the geos-commits
mailing list