I am trying to add mile markers to interstate centerline data. I've tried both the native dissolve tool (which freezes QGis) and SAGA line dissolve to create one continuous line. When I run the QChainage tool it seems to read the nodes (breaks) in the original data as still being there. I am not sure if this is a dissolve issue or QChainage issue but I haven't found a solution or work around for this. It seems the dissolve tools don't actually create a continuous feature.
1 Answer
I think @jberrio has identified the problem - I find this happens quite often working with OpenStreetMap data, where people have digitized road segments in different directions.
This results in some segments having negative lengths, so when chainage runs, some nodes are further (or not as far) along the line as they should be.
To fix this, the plugin Join Multiple Lines can fix line segments to go in one direction. This is also available in QGIS 3 as well as QGIS 2.
Once this is done, Qchainage should work as expected. (You may need to do some manual editing after it runs, it works well on simple line geometries but some things like loops and branches can need tidying up)
From the plugin notes.
After selecting multiple features of a line layer, this plugin can merge them into one feature with a continuous line. The plugin will automatically put the selected lines in a geographically logical order and direction. If the end points of two lines do not match exactly, a line segment between both points is added to make the end result a single, continuous line. The attributes of the new line will be those of one of the selected features, but one cannot predict which one.
-
Well done, Sir! "Join Multiple Lines" solved this same problem with National Hydrography (NHD) data. Oct 3, 2018 at 16:51