[SCM] PostGIS branch master updated. 3.4.0rc1-1068-g41561a9d6

git at osgeo.org git at osgeo.org
Mon Mar 25 12:42:54 PDT 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 "PostGIS".

The branch, master has been updated
       via  41561a9d6f7049389b4f6f2224d960541e647a1e (commit)
      from  c2931466ddb2f3b7b9e7581561aa0c7c8391791f (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 41561a9d6f7049389b4f6f2224d960541e647a1e
Author: Sandro Santilli <strk at kbt.io>
Date:   Mon Mar 25 20:17:57 2024 +0100

    Add more debugging lines

diff --git a/liblwgeom/topo/lwgeom_topo.c b/liblwgeom/topo/lwgeom_topo.c
index 73a539235..fde0b3992 100644
--- a/liblwgeom/topo/lwgeom_topo.c
+++ b/liblwgeom/topo/lwgeom_topo.c
@@ -5408,6 +5408,7 @@ _lwt_AddLineEdge( LWT_TOPOLOGY* topo, LWLINE* edge, double tol,
   lwpoint_free(start_point); /* too late if lwt_AddPoint calls lwerror */
   if ( nid[0] == -1 ) return -1; /* lwerror should have been called */
   moved += mm;
+  LWDEBUGF(1, "start point added or found as being %" LWTFMT_ELEMID " (moved ? %d)", nid[1], mm);
 
 
   end_point = lwline_get_lwpoint(edge, edge->points->npoints-1);
@@ -5420,9 +5421,10 @@ _lwt_AddLineEdge( LWT_TOPOLOGY* topo, LWLINE* edge, double tol,
   nid[1] = _lwt_AddPoint( topo, end_point,
                           _lwt_minTolerance(lwpoint_as_lwgeom(end_point)),
                           handleFaceSplit, &mm );
-  moved += mm;
   lwpoint_free(end_point); /* too late if lwt_AddPoint calls lwerror */
   if ( nid[1] == -1 ) return -1; /* lwerror should have been called */
+  moved += mm;
+  LWDEBUGF(1, "end point added or found as being %" LWTFMT_ELEMID " (moved ? %d)", nid[1], mm);
 
   /*
     -- Added endpoints may have drifted due to tolerance, so
@@ -5431,6 +5433,8 @@ _lwt_AddLineEdge( LWT_TOPOLOGY* topo, LWLINE* edge, double tol,
   if ( moved )
   {
 
+    LWDEBUG(1, "One or both line endpoints moved by snap, updating line");
+
     nn = nid[0] == nid[1] ? 1 : 2;
     node = lwt_be_getNodeById( topo, nid, &nn,
                                LWT_COL_NODE_NODE_ID|LWT_COL_NODE_GEOM );
@@ -5463,9 +5467,13 @@ _lwt_AddLineEdge( LWT_TOPOLOGY* topo, LWLINE* edge, double tol,
 
     if ( nn ) _lwt_release_nodes(node, nn);
 
+    LWDEBUGG(2, lwline_as_lwgeom(edge), "Snapped after drifted endpoints snap");
+
     /* make valid, after snap (to handle collapses) */
     tmp = lwgeom_make_valid(lwline_as_lwgeom(edge));
 
+    LWDEBUGG(2, tmp, "Made-valid after snap to drifted endpoints");
+
     col = lwgeom_as_lwcollection(tmp);
     if ( col )
     {{
@@ -5504,6 +5512,7 @@ _lwt_AddLineEdge( LWT_TOPOLOGY* topo, LWLINE* edge, double tol,
         return 0;
       }
     }
+
   }
 
   /* check if the so-snapped edge _now_ exists */

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

Summary of changes:
 liblwgeom/topo/lwgeom_topo.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list