[GRASS-user] How to link or combine adjacent vector lines

Stefan Luedtke sluedtke at gfz-potsdam.de
Sat Feb 11 13:49:15 EST 2012


Sorry for the delay... and thanks for the fast answer. 

Adding a column and then running a command in the sense of "v.dissolve"
is not an option because there are just to many. I was thinking of a way
that combines two lines into one if they share the same node. For the
example mentioned the last time, this means, keeping the line as a
single one until the tributary merges the main river. The main river
might consist of more than one line, but a short tributary should not. 

I hope I dont miss anything obvious .... ;-)

Cheers, 

Stefan

On Fri, 2012-02-10 at 17:04 +0200, Micha Silver wrote:

> On 02/09/2012 11:59 PM, sluedtke wrote: 
> 
> > Dear friends, 
> > 
> > I have been trying for some hours now but could not find any solution. 
> > 
> > We do have a shape file of a river network,  but a bad one because single
> > rivers consist of multiple lines. Just think of the easiest example, a river
> > with one tributary. I would like to end up with an vector dataset that holds
> > 2 lines for this example, one for the river and one for the tributary of
> > course. In my case, the dataset holds, just as an example, 10 lines, and a
> > distinct set of them makes either the river or the tributary. The lines of
> > each set are connected by the nodes of the single lines. 
> > 
> > 
> > Any ideas how to get ride of this format are very welcome. 
> 
> 
> You might be interested in this thread from a year ago.
> http://osgeo-org.1560.n6.nabble.com/snap-point-to-line-break-line-at-given-points-tp3887413p3887413.html
> 
> The short story is that GRASS builds topology when importing a line
> vector. So each intersection of two lines (i.e. a tributary that
> branches off the main channel) will be made into a separate line. You
> can force GRASS to ignore topology, but you probably don't want to.
> And a correct river network does indeed keep each stream reach as a
> separate line. (Then you can use the various river network modules
> r.stream.*). So maybe your original shapefile is not "bad"...
> 
> What you can do it add an additional column to the vector attrib table
> and indicate, in that column, which tributary each segment belongs to.
> THen you can select, display, label, calculate, etc based on this
> "tributary" attribute column. Would that help?
> 
> 
> 
> > Thanks in advance, 
> > 
> > Stefan
> > 
> > 
> > 
> > --
> > View this message in context: http://osgeo-org.1560.n6.nabble.com/How-to-link-or-combine-adjacent-vector-lines-tp4381557p4381557.html
> > Sent from the Grass - Users mailing list archive at Nabble.com.
> > _______________________________________________
> > grass-user mailing list
> > grass-user at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/grass-user
> > 
> > This mail was received via Mail-SeCure System.
> > 
> > 
> 
> 
> 
> 
> 
> -- 
> Micha Silver
> GIS Consultant, Arava Development Co.
> http://www.surfaces.co.il
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20120211/1fb45839/attachment.html


More information about the grass-user mailing list