[GRASS-user] v.split: Strange behaviour

Craig Leat craig at pid.co.za
Thu Feb 21 04:39:12 EST 2008


Jachym Cepicky wrote:
> hi,
>
> what about v.edit ?
>
> # new file with vertexes
> v.to.points in=roads out=tmp -v 
>
> # copy original file
> g.copy vect=roads,myroads
>
> # run v.edit
> for line in `v.out.ascii tmp`; do 
>      eval `echo $line|sed -e "s/^/x=/" -e "s/|/; y=/" -e "s/|.*//"`;  
>      echo $line; 
>      v.edit -t map=myroads tool=break coords=$x,$y >/dev/null 2>&1; 
> done
>
> well, it is not the best solution, but seems to work, but it failed for
> me after 39 vertexes :-/
>   

Hi Jachym

An interesting idea - thanks for the suggestion. I have found many 
problems with my table (e.g one record pointing to many lines and some 
records not pointing to any lines) so I decided to dump the table and 
start from scratch. v.split worked well and so I have been able to clean 
up the lines quite easily. I think the ability for v.split to update the 
table by creating new records for each new line segment would be a GREAT 
feature.

Regards

Craig


More information about the grass-user mailing list