By Mardymonkey


2019-02-09 11:13:14 8 Comments

I started with a network of polylines. In QGIS I used dissolve to 'merge' all lines according to an attribute value. This did exactly that, but included non-connecting lines which I don't want. I then tried to use Multipart to Singlepart hoping this would split the newly dissolved network at the non-connecting points. However this seems to split back to the original network prior to using dissolve.

Am I following this process incorrectly or is there a better solution to what I am trying to do?

1 comments

@Gabriel De Luca 2019-02-09 16:46:29

Dissolve tool creates multipart features. With the field option, you are grouping the features that are going to be the geometry parts of a new feature, according to an attribute.

That's fine. The result is a Dissolved layer with a feature for each occurrence of that attribute. But each feature has many parts (as many as original features with that attribute had). Some of them are adjacent and others are not.

To join the adjacent parts of the same feature there are some methods, in your case I recommend using the Merge lines tool (search for it in the processing toolbox). The input is the Dissolved layer, and the output is a Merged layer.

Now, each feature has parts only for non-adjacent geometries.

You can use the Multipart to singleparts tool now, to have different features (with the same attribute) for any part of the Merged layer features.

@Mardymonkey 2019-02-09 17:09:19

Brilliant. That works for me! Thanks.

@Gabriel De Luca 2019-02-09 17:13:35

@Mardymonkey, most welcome!

Related Questions

Sponsored Content

0 Answered Questions

Dissolving complex polygons using PyQGIS?

0 Answered Questions

Native QGIS Dissolve tool not compatible with SAGA Split Lines at Points tool

  • 2018-09-17 08:41:43
  • user32882
  • 34 View
  • 1 Score
  • 0 Answer
  • Tags:   qgis saga

0 Answered Questions

Automate a process in QGIS using graphical modeler

  • 2015-12-29 23:43:47
  • DennisTG
  • 316 View
  • 1 Score
  • 0 Answer
  • Tags:   qgis qgis-modeler

0 Answered Questions

Last vertex incorrect after Dissolve (QGIS)

1 Answered Questions

1 Answered Questions

[SOLVED] ArcGIS 10.3 Dissolve tool splitting up lines, not dissolving them

1 Answered Questions

[SOLVED] "Singleparts to multipart" vs. "Dissolve"

1 Answered Questions

Sponsored Content