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

git at osgeo.org git at osgeo.org
Tue Nov 5 14:46:00 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  d9d96a2e66ee3ff91c1498a0e4bcba7e6842b9f3 (commit)
      from  7fc5059b95621660a0496bc5ccdd3391d3daf7dd (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 d9d96a2e66ee3ff91c1498a0e4bcba7e6842b9f3
Author: Martin Davis <mtnclimb at gmail.com>
Date:   Tue Nov 5 14:45:36 2024 -0800

    Fix TaggedLineString as per JTS 1096

diff --git a/src/simplify/TaggedLineString.cpp b/src/simplify/TaggedLineString.cpp
index e0dc40ddb..9a6d09324 100644
--- a/src/simplify/TaggedLineString.cpp
+++ b/src/simplify/TaggedLineString.cpp
@@ -169,7 +169,7 @@ TaggedLineString::extractCoordinates(
 
     if(size) {
         for(std::size_t i = 0; i < size; i++) {
-            TaggedLineSegment* seg = segs[i];
+                TaggedLineSegment* seg = segs[i];
             assert(seg);
             pts->add(seg->p0);
         }
@@ -185,7 +185,6 @@ TaggedLineString::extractCoordinates(
 const Coordinate&
 TaggedLineString::getCoordinate(std::size_t i) const
 {
-
     return parentLine->getCoordinateN(i);
 }
 
@@ -198,6 +197,10 @@ TaggedLineString::size() const
 const Coordinate&
 TaggedLineString::getComponentPoint() const
 {
+    //-- when simplified use a valid coordinate
+    if (resultSegs.size() > 0) {
+        return resultSegs[0]->p0;
+    }
     return getParentCoordinates()->getAt(1);
 }
 

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

Summary of changes:
 src/simplify/TaggedLineString.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list