ソースを参照

vectorlib: use Vect_line_intersection2() in Vect_break_lines*()

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@70791 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 8 年 前
コミット
57a59610b7
1 ファイル変更12 行追加3 行削除
  1. 12 3
      lib/vector/Vlib/break_lines.c

+ 12 - 3
lib/vector/Vlib/break_lines.c

@@ -382,9 +382,18 @@ int break_lines(struct Map_info *Map, struct ilist *List_break,
 
 
 	    AXLines = NULL;
 	    AXLines = NULL;
 	    BXLines = NULL;
 	    BXLines = NULL;
-	    Vect_line_intersection(APoints, BPoints, &ABox, BBox,
-	                           &AXLines, &BXLines,
-				   &naxlines, &nbxlines, 0);
+
+	    if (aline != bline) {
+		Vect_line_intersection2(APoints, BPoints, &ABox, BBox,
+				       &AXLines, &BXLines,
+				       &naxlines, &nbxlines, 0);
+	    }
+	    else {
+		Vect_line_intersection2(APoints, NULL, &ABox, BBox,
+				       &AXLines, &BXLines,
+				       &naxlines, &nbxlines, 0);
+	    }
+
 	    G_debug(3, "  naxlines = %d nbxlines = %d", naxlines, nbxlines);
 	    G_debug(3, "  naxlines = %d nbxlines = %d", naxlines, nbxlines);
 
 
 	    /* This part handles a special case when aline == bline, no other intersection was found
 	    /* This part handles a special case when aline == bline, no other intersection was found