Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Join multiple line segments into one line - GIS

Tags:

gis

qgis

I have a map that I have digitised and converted to a vector layer (the rivers only). The problem is that the vectorisation has produced a large number of segments for each river, that show up as different features (each may have multiple straight line segments, but they do not cover whole rivers). What I am looking for is a tool to merge into one feature (a polyline, I guess) all the segments whose extremes are within a given distance. I am using QGis, and the GRASS plugin. I have tried v.clean.snap, v.build.polylines, but did not yet manage to actually merge the lines. Any help would be very appreciated!

like image 855
LittleFish Avatar asked Mar 17 '12 16:03

LittleFish


People also ask

Where is the merge tool in ArcGIS?

In ArcGIS and ArcGIS Pro, the Merge Tool is in the Data Management Toolbox and within the General Toolset. You can add your inputs and change your output feature class name. The field map option is to match all the corresponding fields, so they'll be combined together after running the Merge Tool.


2 Answers

A very late answer that could be useful to other people :

I faced the same issue and I developed a QGIS plugin to solve it. It automatically merges multiple connected lines (i.e. lines that share an endpoint) into a smaller set of longer lines. The output layer type is Line, not PolyLine. Merging can be based on one of these two criteria:

  • Length: a segment is merged to its longest neighbor.
  • Alignment: a segment is merged to its best aligned neighbor. I think this criterion is the most suitable for a river network.

This plugin is called MergeLines (full documentation here), you can find it in the public QGIS repo. Work is still in progress, don't hesitate to suggest new functionalities.

like image 193
ArMoraer Avatar answered Sep 18 '22 00:09

ArMoraer


I'd suggest selecting the line parts manually and then using the "merge" tool (located in advanced editing toolbar).

You might also want to ask such questions over at http://gis.stackexchange.com

like image 37
underdark Avatar answered Sep 17 '22 00:09

underdark