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

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Nov 10 13:03:53 PST 2012


Author: mmetz
Date: 2012-11-10 13:03:53 -0800 (Sat, 10 Nov 2012)
New Revision: 53767

Modified:
   grass/trunk/lib/vector/Vlib/remove_duplicates.c
Log:
Vlib: speed up Vect_remove_duplicates()

Modified: grass/trunk/lib/vector/Vlib/remove_duplicates.c
===================================================================
--- grass/trunk/lib/vector/Vlib/remove_duplicates.c	2012-11-10 19:11:16 UTC (rev 53766)
+++ grass/trunk/lib/vector/Vlib/remove_duplicates.c	2012-11-10 21:03:53 UTC (rev 53767)
@@ -84,7 +84,10 @@
 	    continue;
 	}
 
-	Vect_line_box(APoints, &ABox);
+	/* select potential duplicates */
+	ABox.E = ABox.W = APoints->x[0];
+	ABox.N = ABox.S = APoints->y[0];
+	ABox.T = ABox.B = APoints->z[0];
 	Vect_select_lines_by_box(Map, &ABox, type, List);
 	G_debug(3, "  %d lines selected by box", List->n_values);
 



More information about the grass-commit mailing list