]> granicus.if.org Git - postgis/commitdiff
Do not use NOTICE channel for debugging prints
authorSandro Santilli <strk@keybit.net>
Tue, 18 Aug 2015 17:10:32 +0000 (17:10 +0000)
committerSandro Santilli <strk@keybit.net>
Tue, 18 Aug 2015 17:10:32 +0000 (17:10 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@13934 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/lwgeom_topo.c
topology/postgis_topology.c

index ecc41d53c4d57116215a4dab8f43e9c4fce3ba16..b390f03e32db72892825f405daffb9fce1fef9f0 100644 (file)
@@ -560,7 +560,7 @@ _lwt_CheckEdgeCrossing( LWT_TOPOLOGY* topo,
   /* loop over each node within the edge's gbox */
   nodes = lwt_be_getNodeWithinBox2D( topo, edgebox, &num_nodes,
                                             LWT_COL_NODE_ALL, 0 );
-  lwnotice("lwt_be_getNodeWithinBox2D returned %d nodes", num_nodes);
+  LWDEBUGF(1, "lwt_be_getNodeWithinBox2D returned %d nodes", num_nodes);
   if ( num_nodes == -1 ) {
     GEOSPreparedGeom_destroy(prepared_edge);
     GEOSGeom_destroy(edgegg);
@@ -2205,7 +2205,7 @@ _lwt_AddEdge( LWT_TOPOLOGY* topo,
             p1.x, p1.y, pn.x, pn.y);
     return -1;
   }
-  lwnotice("edge's start node is %g,%g", p1.x, p1.y);
+  LWDEBUGF(1, "edge's start node is %g,%g", p1.x, p1.y);
 
   /* Compute azimuth of last edge end on end node */
   getPoint2d_p(pa, pa->npoints-1, &p2);
@@ -2215,7 +2215,7 @@ _lwt_AddEdge( LWT_TOPOLOGY* topo,
             p2.x, p2.y, pn.x, pn.y);
     return -1;
   }
-  lwnotice("edge's end node is %g,%g", p2.x, p2.y);
+  LWDEBUGF(1, "edge's end node is %g,%g", p2.x, p2.y);
 
   /*
    * Check endpoints existance, match with Curve geometry
@@ -2255,7 +2255,7 @@ _lwt_AddEdge( LWT_TOPOLOGY* topo,
       }
     }
 
-    lwnotice("Node %d, with geom %p (looking for %d and %d)",
+    LWDEBUGF(1, "Node %d, with geom %p (looking for %d and %d)",
              node->node_id, node->geom, start_node, end_node);
     if ( node->node_id == start_node ) {
       start_node_geom = node->geom;
@@ -3608,7 +3608,7 @@ _lwt_RemEdge( LWT_TOPOLOGY* topo, LWT_ELEMID edge_id, int modFace )
     return -1;
   }
 
-  lwnotice("Updating next_{right,left}_face of ring edges...");
+  LWDEBUGF(1, "Updating next_{right,left}_face of ring edges...");
 
   /* Update edge linking */
 
index 6bd31256f7cbac3310f61d2a6dcd261cc1d73089..6aab4981e57e4888f1e370775595cde2a60434a3 100644 (file)
@@ -746,7 +746,7 @@ cb_getEdgeById(const LWT_BE_TOPOLOGY* topo,
   }
   pfree(sqldata.data);
 
-  lwpgnotice("cb_getEdgeById: edge query returned %d rows", SPI_processed);
+  POSTGIS_DEBUGF(1, "cb_getEdgeById: edge query returned %d rows", SPI_processed);
   *numelems = SPI_processed;
   if ( ! SPI_processed ) {
     return NULL;
@@ -1025,7 +1025,7 @@ cb_getNodeById(const LWT_BE_TOPOLOGY* topo,
   }
   pfree(sqldata.data);
 
-  lwpgnotice("cb_getNodeById: edge query returned %d rows", SPI_processed);
+  POSTGIS_DEBUGF(1, "cb_getNodeById: edge query returned %d rows", SPI_processed);
   *numelems = SPI_processed;
   if ( ! SPI_processed ) {
     return NULL;
@@ -1072,7 +1072,7 @@ cb_getNodeByFace(const LWT_BE_TOPOLOGY* topo,
   }
   pfree(sqldata.data);
 
-  lwpgnotice("cb_getNodeByFace: edge query returned %d rows", SPI_processed);
+  POSTGIS_DEBUGF(1, "cb_getNodeByFace: edge query returned %d rows", SPI_processed);
   *numelems = SPI_processed;
   if ( ! SPI_processed ) {
     return NULL;
@@ -1124,7 +1124,7 @@ cb_getEdgeWithinDistance2D(const LWT_BE_TOPOLOGY* topo,
   } else if ( elems_requested > 0 ) {
     appendStringInfo(sql, " LIMIT %d", elems_requested);
   }
-  lwpgnotice("cb_getEdgeWithinDistance2D: query is: %s", sql->data);
+  POSTGIS_DEBUGF(1, "cb_getEdgeWithinDistance2D: query is: %s", sql->data);
   spi_result = SPI_execute(sql->data, !topo->be_data->data_changed, limit >= 0 ? limit : 0);
   MemoryContextSwitchTo( oldcontext ); /* switch back */
   if ( spi_result != SPI_OK_SELECT ) {
@@ -1133,7 +1133,7 @@ cb_getEdgeWithinDistance2D(const LWT_BE_TOPOLOGY* topo,
   }
   pfree(sqldata.data);
 
-  lwpgnotice("cb_getEdgeWithinDistance2D: edge query "
+  POSTGIS_DEBUGF(1, "cb_getEdgeWithinDistance2D: edge query "
              "(limited by %d) returned %d rows",
              elems_requested, SPI_processed);
   *numelems = SPI_processed;
@@ -1150,7 +1150,7 @@ cb_getEdgeWithinDistance2D(const LWT_BE_TOPOLOGY* topo,
       dat = SPI_getbinval(SPI_tuptable->vals[0], SPI_tuptable->tupdesc, 1, &isnull);
       exists = DatumGetBool(dat);
       *numelems = exists ? 1 : 0;
-      lwpgnotice("cb_getEdgeWithinDistance2D: exists ? %d", *numelems);
+      POSTGIS_DEBUGF(1, "cb_getEdgeWithinDistance2D: exists ? %d", *numelems);
     }
     return NULL;
   }
@@ -1217,7 +1217,7 @@ cb_getNodeWithinDistance2D(const LWT_BE_TOPOLOGY* topo,
   }
   pfree(sqldata.data);
 
-  lwpgnotice("cb_getNodeWithinDistance2D: node query "
+  POSTGIS_DEBUGF(1, "cb_getNodeWithinDistance2D: node query "
              "(limited by %d) returned %d rows",
              elems_requested, SPI_processed);
   if ( ! SPI_processed ) {
@@ -1449,7 +1449,7 @@ cb_updateEdges( const LWT_BE_TOPOLOGY* topo,
 
   if ( SPI_processed ) topo->be_data->data_changed = true;
 
-  lwpgnotice("cb_updateEdges: update query processed %d rows", SPI_processed);
+  POSTGIS_DEBUGF(1, "cb_updateEdges: update query processed %d rows", SPI_processed);
 
   return SPI_processed;
 }
@@ -2484,7 +2484,7 @@ cb_getNodeWithinBox2D ( const LWT_BE_TOPOLOGY* topo, const GBOX* box,
   } else if ( elems_requested > 0 ) {
     appendStringInfo(sql, " LIMIT %d", elems_requested);
   }
-  lwpgnotice("cb_getNodeWithinBox2D: query is: %s", sql->data);
+  POSTGIS_DEBUGF(1,"cb_getNodeWithinBox2D: query is: %s", sql->data);
   spi_result = SPI_execute(sql->data, !topo->be_data->data_changed, limit >= 0 ? limit : 0);
   MemoryContextSwitchTo( oldcontext ); /* switch back */
   if ( spi_result != SPI_OK_SELECT ) {
@@ -2493,7 +2493,7 @@ cb_getNodeWithinBox2D ( const LWT_BE_TOPOLOGY* topo, const GBOX* box,
   }
   pfree(sqldata.data);
 
-  lwpgnotice("cb_getNodeWithinBox2D: edge query "
+  POSTGIS_DEBUGF(1, "cb_getNodeWithinBox2D: edge query "
              "(limited by %d) returned %d rows",
              elems_requested, SPI_processed);
   *numelems = SPI_processed;
@@ -2510,7 +2510,7 @@ cb_getNodeWithinBox2D ( const LWT_BE_TOPOLOGY* topo, const GBOX* box,
       dat = SPI_getbinval(SPI_tuptable->vals[0], SPI_tuptable->tupdesc, 1, &isnull);
       exists = DatumGetBool(dat);
       *numelems = exists ? 1 : 0;
-      lwpgnotice("cb_getNodeWithinBox2D: exists ? %d", *numelems);
+      POSTGIS_DEBUGF(1, "cb_getNodeWithinBox2D: exists ? %d", *numelems);
     }
     return NULL;
   }
@@ -2554,7 +2554,7 @@ cb_getEdgeWithinBox2D ( const LWT_BE_TOPOLOGY* topo, const GBOX* box,
   } else if ( elems_requested > 0 ) {
     appendStringInfo(sql, " LIMIT %d", elems_requested);
   }
-  lwpgnotice("cb_getEdgeWithinBox2D: query is: %s", sql->data);
+  POSTGIS_DEBUGF(1,"cb_getEdgeWithinBox2D: query is: %s", sql->data);
   spi_result = SPI_execute(sql->data, !topo->be_data->data_changed, limit >= 0 ? limit : 0);
   MemoryContextSwitchTo( oldcontext ); /* switch back */
   if ( spi_result != SPI_OK_SELECT ) {
@@ -2563,7 +2563,7 @@ cb_getEdgeWithinBox2D ( const LWT_BE_TOPOLOGY* topo, const GBOX* box,
   }
   pfree(sqldata.data);
 
-  lwpgnotice("cb_getEdgeWithinBox2D: edge query "
+  POSTGIS_DEBUGF(1, "cb_getEdgeWithinBox2D: edge query "
              "(limited by %d) returned %d rows",
              elems_requested, SPI_processed);
   *numelems = SPI_processed;
@@ -2580,7 +2580,7 @@ cb_getEdgeWithinBox2D ( const LWT_BE_TOPOLOGY* topo, const GBOX* box,
       dat = SPI_getbinval(SPI_tuptable->vals[0], SPI_tuptable->tupdesc, 1, &isnull);
       exists = DatumGetBool(dat);
       *numelems = exists ? 1 : 0;
-      lwpgnotice("cb_getEdgeWithinBox2D: exists ? %d", *numelems);
+      POSTGIS_DEBUGF(1, "cb_getEdgeWithinBox2D: exists ? %d", *numelems);
     }
     return NULL;
   }