I have a line layer that seemingly consists of a single feature. I then ran QGIS's Multipart to Singleparts algorithm (same result as Extract Nodes), so then the result consists of 27 line features:
The problem is that the line is not ordered, so when I'm trying to calculate distance along this path (whether the line layer is dissolved or not), the results end up wrong.
My current workaround is to buffer the layer (with dissolve all option) then running v.voronoi.skeleton. This works ('resetting' the line completely into one feature), but for some line inputs produces no result. Can anyone come up with a solution to re-order line segments in QGIS?
Using QGIS 2.18, open to a PyQGIS solution! I must run this solution on hundreds of layers, so preferably no plugins.