소스 검색

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;
 	    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);
 
 	    /* This part handles a special case when aline == bline, no other intersection was found