[postgis-tickets] r15329 - Print more digits in debugging outputs about azimuth computation

Sandro Santilli strk at kbt.io
Sat Mar 11 06:33:33 PST 2017


Author: strk
Date: 2017-03-11 06:33:33 -0800 (Sat, 11 Mar 2017)
New Revision: 15329

Modified:
   trunk/liblwgeom/lwgeom_topo.c
Log:
Print more digits in debugging outputs about azimuth computation

Modified: trunk/liblwgeom/lwgeom_topo.c
===================================================================
--- trunk/liblwgeom/lwgeom_topo.c	2017-03-11 06:21:06 UTC (rev 15328)
+++ trunk/liblwgeom/lwgeom_topo.c	2017-03-11 14:33:33 UTC (rev 15329)
@@ -18,7 +18,7 @@
  *
  **********************************************************************
  *
- * Copyright (C) 2015 Sandro Santilli <strk at kbt.io>
+ * Copyright (C) 2015-2017 Sandro Santilli <strk at kbt.io>
  *
  **********************************************************************/
 
@@ -1465,11 +1465,11 @@
     return -1;
   }
   if ( ! azimuth_pt_pt(fp, &pt, &(fee->myaz)) ) {
-    lwerror("error computing azimuth of first edgeend [%g %g,%g %g]",
+    lwerror("error computing azimuth of first edgeend [%.15g %.15g,%.15g %.15g]",
             fp->x, fp->y, pt.x, pt.y);
     return -2;
   }
-  LWDEBUGF(1, "azimuth of first edge end [%g %g,%g %g] is %g",
+  LWDEBUGF(1, "azimuth of first edge end [%.15g %.15g,%.15g %.15g] is %g",
             fp->x, fp->y, pt.x, pt.y, fee->myaz);
 
   /* Compute azimuth of second edge end */
@@ -1480,11 +1480,11 @@
     return -1;
   }
   if ( ! azimuth_pt_pt(lp, &pt, &(lee->myaz)) ) {
-    lwerror("error computing azimuth of last edgeend [%g %g,%g %g]",
+    lwerror("error computing azimuth of last edgeend [%.15g %.15g,%.15g %.15g]",
             lp->x, lp->y, pt.x, pt.y);
     return -2;
   }
-  LWDEBUGF(1, "azimuth of last edge end [%g %g,%g %g] is %g",
+  LWDEBUGF(1, "azimuth of last edge end [%.15g %.15g,%.15g %.15g] is %g",
             lp->x, lp->y, pt.x, pt.y, lee->myaz);
 
   return 0;
@@ -1579,7 +1579,7 @@
         LWT_ELEMID id = edge->edge_id;
         _lwt_release_edges(edges, numedges);
         lwgeom_free(cleangeom);
-        lwerror("error computing azimuth of edge %d first edgeend [%g,%g-%g,%g]",
+        lwerror("error computing azimuth of edge %d first edgeend [%.15g %.15g,%.15g %.15g]",
                 id, p1.x, p1.y, p2.x, p2.y);
         return -1;
       }}
@@ -1635,7 +1635,7 @@
         LWT_ELEMID id = edge->edge_id;
         _lwt_release_edges(edges, numedges);
         lwgeom_free(cleangeom);
-        lwerror("error computing azimuth of edge %d last edgeend [%g,%g-%g,%g]",
+        lwerror("error computing azimuth of edge %d last edgeend [%.15g %.15g,%.15g %.15g]",
                 id, p1.x, p1.y, p2.x, p2.y);
         return -1;
       }}



More information about the postgis-tickets mailing list