[GRASS-user] v.dissolve for lines?

Micha Silver micha at arava.co.il
Wed Oct 20 03:44:20 EDT 2010


  On 20/10/2010 08:36, Markus Metz wrote:
> Micha Silver wrote:
>> Bryan Keith wrote:
>>> Hello,
>>>
>>> I have a vector line file that has lots of two-vertex lines.  Many of
>>> these two-vertex lines share endpoints and really just make parts of one
>>> longer line.  I'd like to dissolve these lines into one line when they
>>> have the same end point.  It looks like v.dissolve only works for areas.
>>> Is there somewhere else I should be looking?  Thank you.
>>>
>>>
>> Did you have a look at v.build.polylines ?
>> Additional note: line vectors have a direction. Two line segments with an
>> equivalent node (end point) will *not* connect if they are in opposite
>> directions.
> Each line has two nodes, one at the start and one at the end. If at
> the end of one line any other line is starting or ending, this other
> line is added to the first line, reversing the direction if necessary.
> IOW, two lines with a common node will indeed connect, and the
> direction of one line may need to be reversed (done automatically).
> Very simple to test by digitizing a simple test vector.
>
Heh, thanks for the correction!
Was this always the case? I seem to remember not be able to 
merge lines unless they were connected in the same direction.
How does the line reversal work? That is, Which of the two 
line segments is chosen be get reversed?
Regards,
Micha

> In this case you can try the v.edit tool=flip option (on those
>> segments only)
> Should not be needed as pre-processing step for v.build.polylines.
>
>
> Markus M
>
> This mail was received via Mail-SeCure System.
>
>


-- 
Micha Silver
http://www.surfaces.co.il/
Arava Development Co.  +972-52-3665918



More information about the grass-user mailing list