[GRASS-SVN] r36530 - grass/trunk/lib/vector/Vlib

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Mar 30 10:32:03 EDT 2009


Author: martinl
Date: 2009-03-30 10:32:02 -0400 (Mon, 30 Mar 2009)
New Revision: 36530

Modified:
   grass/trunk/lib/vector/Vlib/build_nat.c
   grass/trunk/lib/vector/Vlib/geos.c
Log:
ignore dead line in Vect_read_line_geos()
debug message cosmetics


Modified: grass/trunk/lib/vector/Vlib/build_nat.c
===================================================================
--- grass/trunk/lib/vector/Vlib/build_nat.c	2009-03-30 12:20:23 UTC (rev 36529)
+++ grass/trunk/lib/vector/Vlib/build_nat.c	2009-03-30 14:32:02 UTC (rev 36530)
@@ -75,7 +75,7 @@
 	line = abs(lines[j]);
 	BLine = plus->Line[line];
 	offset = BLine->offset;
-	G_debug(3, "  line[%d] = %d, offset = %ld", j, line, offset);
+	G_debug(3, "  line[%d] = %d, offset = %lu", j, line, (unsigned long) offset);
 	type = Vect_read_line(Map, Points, NULL, line);
 	if (lines[j] > 0)
 	    direction = GV_FORWARD;
@@ -541,7 +541,7 @@
 
 	    offset = Map->head.last_offset;
 
-	    G_debug(3, "Register line: offset = %ld", offset);
+	    G_debug(3, "Register line: offset = %lu", (unsigned long) offset);
 	    lineid = dig_add_line(plus, type, Points, offset);
 	    dig_line_box(Points, &box);
 	    if (lineid == 1)

Modified: grass/trunk/lib/vector/Vlib/geos.c
===================================================================
--- grass/trunk/lib/vector/Vlib/geos.c	2009-03-30 12:20:23 UTC (rev 36529)
+++ grass/trunk/lib/vector/Vlib/geos.c	2009-03-30 14:32:02 UTC (rev 36530)
@@ -51,7 +51,7 @@
 	dim = 2;
 
     type = Vect_read_line(Map, Points, NULL, line);
-    if (type < 0)
+    if (type < 1) /* ignore dead lines */
 	return NULL;
 
     return Vect_line_to_geos(Map, Points, type);



More information about the grass-commit mailing list