Просмотр исходного кода

Vlib: speed up Vect_remove_duplicates()

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@53767 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 12 лет назад
Родитель
Сommit
2af4251120
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      lib/vector/Vlib/remove_duplicates.c

+ 4 - 1
lib/vector/Vlib/remove_duplicates.c

@@ -84,7 +84,10 @@ void Vect_remove_duplicates(struct Map_info *Map, int type, struct Map_info *Err
 	    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);