[GRASS-user] more on v.net: break lines on nodes

Johannes Radinger JRadinger at gmx.at
Tue Feb 28 07:49:25 EST 2012


I'd like to re-open a quite old thread about breaking lines in
a network.

the old thread:
>If each line is a straight line, then you have two nodes, one at each end. >So, do you mean that you want to break the longer line, thus creating two >new nodes, representing the new end points of the two parts and then snap >these two nodes back together again and snap a third node (from the other >line) to that same place ?
>If that is what you want to do, you can use the 'connect' tool in v.edit >>(see "Connect lines" in the man page).
>If you want to break you line at the coordinates of a specific node, you >can do it this way:
>v.edit tool=break cat=CatOfTheLineToBreak coords=CoordinatesOfYourNode >thresh=
>v.edit tool=snap cat=CatOfTheBrokenLine,CatOfOtherLine thresh
>You can get the coordinates of your nodes with v.to.db.
>Hope this helps,

I am in a similar situation: There is the main stem of a river and a contributing tributary. I want to break the main stem at the point where the tributary joins the it. I attached a screenshot with the Cat-numbers as labels and the selected section of the main stem I'd like to break (yellow).

I considered three ways:

1) Use v.clean with first snapping the tributary to the mainstem and then breaking at the intersection. But I am not sure if this works as is is not an intersection (line just joins but don't intersect)!?

2) Using Moritz' approaches with v.edit - connect. Thats what I also tried but without success so far. 

v.edit map=Treene_test at SDM_Treene tool=connect thresh=100,100,100 cats=768,883
Selecting features...
2 of 1336 features selected from vector map <Treene_test at SDM_Treene>
Threshold value for snapping is 100.00
0 lines connected
Building topology for vector map <Treene_test>...

3) or with getting the end point of the tributary (v.to.db) and then use break (v.edit) and setting the ID to the section of the mainstem (and setting the threshold).

I already tried also this approach and then some basic questions arose:

(a) What is the difference between Cat and ID. When I break the line (with v.edit) I get only two IDs but these are actually not two lines (which can e.g. be selected with the "Query vector map tool" in the GUI).

(b) What is a suitable threshold (10,10,10?) Can there be a to large threshold if it is snapped to the nearest feature?

(c) Is it useful to set the snap flag in v.edit in such cases? Or should I use the snap tool (v.edit) as a second process.

(d) As I want two "real" new lines (cats) which show the same attributes, what is the easiest way to go. The connect tool sounds that this should do that job but somehow I fail?

Best regards,


NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!                                  
Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Line_to_break.png
Type: image/png
Size: 12862 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-user/attachments/20120228/8fa61f50/Line_to_break.png

More information about the grass-user mailing list