[postgis-tickets] r14976 - Add more debugging lines

Sandro Santilli strk at kbt.io
Thu Jun 23 00:15:05 PDT 2016


Author: strk
Date: 2016-06-23 00:15:05 -0700 (Thu, 23 Jun 2016)
New Revision: 14976

Modified:
   trunk/liblwgeom/lwgeom_topo.c
Log:
Add more debugging lines

Modified: trunk/liblwgeom/lwgeom_topo.c
===================================================================
--- trunk/liblwgeom/lwgeom_topo.c	2016-06-20 01:45:19 UTC (rev 14975)
+++ trunk/liblwgeom/lwgeom_topo.c	2016-06-23 07:15:05 UTC (rev 14976)
@@ -5651,7 +5651,7 @@
     lwerror("Backend error: %s", lwt_be_lastErrorMessage(topo->be_iface));
     return NULL;
   }
-  LWDEBUGF(1, "Line bbox intersects %d edges bboxes", num);
+  LWDEBUGF(1, "Line has %d points, its bbox intersects %d edges bboxes", line->points->npoints, num);
   if ( num )
   {{
     /* collect those whose distance from us is < tol */
@@ -5661,10 +5661,12 @@
     {
       LWT_ISO_EDGE *e = &(edges[i]);
       LWGEOM *g = lwline_as_lwgeom(e->geom);
+      LWDEBUGF(2, "Computing distance from edge %d having %d points", i, e->geom->points->npoints);
       double dist = lwgeom_mindistance2d(g, noded);
       if ( dist >= tol ) continue; /* must be closer than tolerated */
       nearby[nn++] = g;
     }
+    LWDEBUGF(2, "Found %d lines closer than tolerance (%g)", nn, tol);
     if ( nn )
     {{
       LWCOLLECTION *col;



More information about the postgis-tickets mailing list