[geos-commits] [SCM] GEOS branch master updated. 40e89b9f4d0c2caf35b433d3df823d423eddc932

git at osgeo.org git at osgeo.org
Tue Sep 8 14:24:19 PDT 2020


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  40e89b9f4d0c2caf35b433d3df823d423eddc932 (commit)
      from  8ae842b332c6d199ceeed7792a85b3d84a0baa45 (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 40e89b9f4d0c2caf35b433d3df823d423eddc932
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Tue Sep 8 13:59:24 2020 -0700

    Port https://github.com/dr-jts/jts/commit/feee2334edbc968bf1f7adf0d0de3c11cb2521a2

diff --git a/include/geos/operation/overlayng/OverlayLabeller.h b/include/geos/operation/overlayng/OverlayLabeller.h
index 349b852..342d63b 100644
--- a/include/geos/operation/overlayng/OverlayLabeller.h
+++ b/include/geos/operation/overlayng/OverlayLabeller.h
@@ -51,7 +51,7 @@ private:
     std::vector<OverlayEdge*>& edges;
 
     /**
-    * Finds a boundary edge for this geom, if one exists
+    * Finds a boundary edge for this geom, if one exists.
     */
     static OverlayEdge* findPropagationStartEdge(OverlayEdge* nodeEdge, int geomIndex);
 
@@ -176,7 +176,7 @@ public:
     * for a given area geometry to all edges (and their sym)
     * with unknown locations for that geometry.
     */
-    static void propagateAreaLocations(OverlayEdge* nodeEdge, int geomIndex);
+    void propagateAreaLocations(OverlayEdge* nodeEdge, int geomIndex);
 
     void markResultAreaEdges(int overlayOpCode);
 
diff --git a/src/operation/overlayng/OverlayLabeller.cpp b/src/operation/overlayng/OverlayLabeller.cpp
index e6ae2f2..89032de 100644
--- a/src/operation/overlayng/OverlayLabeller.cpp
+++ b/src/operation/overlayng/OverlayLabeller.cpp
@@ -36,6 +36,7 @@ OverlayLabeller::computeLabelling()
 {
     std::vector<OverlayEdge*> nodes = graph->getNodeEdges();
     labelAreaNodeEdges(nodes);
+    labelConnectedLinearEdges();
 
     //TODO: is there a way to avoid scanning all edges in these steps?
     /**
@@ -44,6 +45,8 @@ OverlayLabeller::computeLabelling()
      * They can be located based on their parent ring role (shell or hole).
      */
     labelCollapsedEdges();
+    labelConnectedLinearEdges();
+
     labelDisconnectedEdges();
 }
 
@@ -58,14 +61,20 @@ OverlayLabeller::labelAreaNodeEdges(std::vector<OverlayEdge*>& nodes)
             propagateAreaLocations(nodeEdge, 1);
         }
     }
-    labelConnectedLinearEdges();
 }
 
-/*public static*/
+/*public*/
 void
 OverlayLabeller::propagateAreaLocations(OverlayEdge* nodeEdge, int geomIndex)
 {
+    /*
+     * Only propagate for area geometries
+     */
+    if (!inputGeometry->isArea(geomIndex))
+        return;
+
     /**
+     * No need to propagate if node has only one edge.
      * This handles dangling edges created by overlap limiting
      */
     if (nodeEdge->degree() == 1)
@@ -138,7 +147,6 @@ OverlayLabeller::labelCollapsedEdges()
             labelCollapsedEdge(edge, 1);
         }
     }
-    labelConnectedLinearEdges();
 }
 
 /*private*/

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

Summary of changes:
 include/geos/operation/overlayng/OverlayLabeller.h |  4 ++--
 src/operation/overlayng/OverlayLabeller.cpp        | 14 +++++++++++---
 2 files changed, 13 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list