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

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Aug 5 13:49:01 PDT 2012


Author: mmetz
Date: 2012-08-05 13:49:01 -0700 (Sun, 05 Aug 2012)
New Revision: 52547

Modified:
   grass/trunk/lib/vector/Vlib/break_lines.c
Log:
Vlib: speed up Vect_break_lines()

Modified: grass/trunk/lib/vector/Vlib/break_lines.c
===================================================================
--- grass/trunk/lib/vector/Vlib/break_lines.c	2012-08-05 20:39:26 UTC (rev 52546)
+++ grass/trunk/lib/vector/Vlib/break_lines.c	2012-08-05 20:49:01 UTC (rev 52547)
@@ -230,6 +230,11 @@
 	    if (List_break && !Vect_val_in_list(List_break, bline)) {
 		continue;
 	    }
+
+	    /* check intersection of aline with bline only once */
+	    if (bline > aline)
+		continue;
+
 	    G_debug(3, "  j = %d bline = %d", j, bline);
 
 	    btype = Vect_read_line(Map, BPoints, BCats, bline);



More information about the grass-commit mailing list