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

Moritz Lennert mlennert at club.worldonline.be
Tue Jul 7 08:07:10 EDT 2009

On 07/07/09 12:18, achim wrote:
> Sorry, not very clear... They are "snapped"!
> I wanted to show that I have
> 1) two lines (two cats) with no common nodes on the network
> 2) I want the longer to be broken on the node of the longer one in order
> to have a common node (and three lines with three cats)

Sorry, I still don't understand: what do you mean by "the node of the 
longer one" ? 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 
v.edit tool=snap cat=CatOfTheBrokenLine,CatOfOtherLine thresh

You can get the coordinates of your nodes with v.to.db.

Hope this helps,

More information about the grass-user mailing list