Pārlūkot izejas kodu

ignore dead line in Vect_read_line_geos()
debug message cosmetics


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@36530 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 16 gadi atpakaļ
vecāks
revīzija
ba5c2a2e7d
2 mainītis faili ar 3 papildinājumiem un 3 dzēšanām
  1. 2 2
      lib/vector/Vlib/build_nat.c
  2. 1 1
      lib/vector/Vlib/geos.c

+ 2 - 2
lib/vector/Vlib/build_nat.c

@@ -75,7 +75,7 @@ int Vect_build_line_area(struct Map_info *Map, int iline, int side)
 	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 @@ int Vect_build_nat(struct Map_info *Map, int build)
 
 	    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)

+ 1 - 1
lib/vector/Vlib/geos.c

@@ -51,7 +51,7 @@ GEOSGeometry *Vect_read_line_geos(const struct Map_info *Map, int line)
 	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);