Browse Source

Vlib: reinstate Vect_break_lines() speed-up (sorry for the noise)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@55858 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 12 years ago
parent
commit
16ae7ee9cc
1 changed files with 7 additions and 3 deletions
  1. 7 3
      lib/vector/Vlib/break_lines.c

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

@@ -320,9 +320,13 @@ int break_lines(struct Map_info *Map, struct ilist *List_break,
 	    if (!break_a && !break_b)
 		continue;
 
-	    /* DO NOT check intersection of aline with bline only once
-	     * because it can happen that one line is broken, but not 
-	     * the other line, in which case some breaks are not detected */
+	    /* check intersection of aline with bline only once
+	     * if possible */
+	    if (break_a && break_b && 
+		aline > bline && 
+		(!List_ref || b_is_ref)) { 
+		continue; 
+	    } 
 
 	    G_debug(3, "  j = %d bline = %d", j, bline);