[GRASS-SVN] r62684 - grass/branches/releasebranch_7_0/vector/v.net
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Nov 9 06:44:36 PST 2014
Author: mmetz
Date: 2014-11-09 06:44:36 -0800 (Sun, 09 Nov 2014)
New Revision: 62684
Modified:
grass/branches/releasebranch_7_0/vector/v.net/connect.c
Log:
v.net: fix #2473
Modified: grass/branches/releasebranch_7_0/vector/v.net/connect.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.net/connect.c 2014-11-09 14:44:14 UTC (rev 62683)
+++ grass/branches/releasebranch_7_0/vector/v.net/connect.c 2014-11-09 14:44:36 UTC (rev 62684)
@@ -29,6 +29,11 @@
struct line_cats *Cats, *Cline, *Cnew;
int maxcat, findex, ncats;
+ struct ilist *exclude_list;
+ int pline;
+
+ exclude_list = Vect_new_list();
+
narcs = 0;
Points = Vect_new_line_struct();
@@ -53,9 +58,9 @@
continue;
/* find the nearest line in given threshold */
- line = Vect_find_line(Out,
- Points->x[0], Points->y[0], Points->z[0],
- GV_LINES, thresh, WITHOUT_Z, 0);
+ line = Vect_find_line_list(Out, Points->x[0], Points->y[0], Points->z[0],
+ GV_LINES, thresh, WITHOUT_Z,
+ exclude_list, NULL);
if (line < 1 || !Vect_line_alive(Out, line))
continue;
@@ -114,7 +119,9 @@
maxcat++;
Vect_reset_cats(Cnew);
Vect_cat_set(Cnew, afield, maxcat);
- Vect_write_line(Out, ltype, Pout, Cnew);
+ pline = Vect_write_line(Out, ltype, Pout, Cnew);
+
+ Vect_list_append(exclude_list, pline);
narcs++;
}
More information about the grass-commit
mailing list