[GRASS-user] Using v.edit to snap dangling lines

David Mahoney mahoneyd at unbc.ca
Wed Feb 27 01:45:04 EST 2008


I've been trying to use v.edit to snap dangling lines after patching  
together a bunch of maps. However, the query=dangle option does not  
seem to work. I've tried:
v.edit map=roads tool=select query=dangle thresh=0
v.edit map=roads tool=select query=dangle thresh=-0
v.edit map=roads tool=select query=dangle thresh=10000
v.edit map=roads tool=select query=dangle thresh=-10000

I get:
0 of 113126 features selected from vector map <roads at dem>v.edit  
complete.

the option query=select does work for me with a suitably large  
negative threshold.

So far, my solution is this:

v.edit map=roads tool=snap thresh=5 snap=node  \
	coord=`v.build roads op=dump | grep "n_lines = 1" | awk -F '=' '{gsub 
(/ /,"");printf("%s,", $4)}'

This parses dangling nodes from v.build's topology dump.

This works, but I can only feed about 16k sets of coordinates into  
v.edit.

Is there some magic I'm missing here?

I'm using GRASS 6.3 cvs (about a month old) on Mac OS X

David



More information about the grass-user mailing list