0

I have a complex network of line features with a lot of attributes (and unique IDs). Many features have the exact same values (exept the ID). I need to join all features with the same attribute which are next to each other. that's what I have: an example network, many features with same values and attributes

That's what I Want: the lines are merged together

that's what I have: an example network, many features with same values and attributes: That's what I Want: the lines are merged together.

I want to merge them by topology: a line should be joined with a touching one. But: where more than 2 are touching (intersection) they should not be merged.

I tried:

  1. dissolve, but then they are all joined, even when far away. then I tried to split up with "multi to single part" but then I came back to where I started.

  2. Join Lines does what I want but not automatically and it's too much to select and join them by hand

Ideal would be a function that merges by 1.aligned neighbour (if more than 1, e.g. at intersection: no join) and 2. by same attribute value

It is very similiar to posted problems: Join line segments sharing a common attribute, using GDAL ; How to join segments of a line in QGIS?

But those have not been answered to a point where the issue is solved.

  • I am not sure if this can help you or not but try to use v.build.polylines under GRASS: grass.osgeo.org/grass70/manuals/v.build.polylines.html. I do not have same case to test, but you can give it a try. – ahmadhanb Mar 1 at 11:54
  • It splits up right at intersections, so that's good, but it merges lines with different attributes together so I end up with stacked multilines – KReisser Mar 4 at 7:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.