qgis – How to Create Centerline from Multi-Digitized Roadway Lines in QGIS 2.18

qgis

I am trying to create an absolute center line layer from US interstate data that is multi-digitized (center line for each direction). I've looked at various options but they require a lot of processing involving voronoi polygons or adding points to lines and using a buffer or averaging those points. They work on very small data sets but anything larger slows down considerably to the point where it would be faster to do it by hand.

I'm currently trying to get v.centerline in GRASS to work but the documentation on it is very limited so I'm not sure if it will accomplish what I'm doing.

It seems that Esri has a tool that will do this. Is there an equivalent in QGis?

The roads don't maintain a perfect parallel so any simple solution tends to fail in those areas. Here's an example. enter image description here

Best Answer

I've come up with a simpler solution to using voronoi polygons. I'm not sure why nobody had tried this. I set up a processing modeler to run a few simple functions to get center points.

Buffer with dissolve on interstate - 200 meters enter image description here

Convert polygon vertices to points on buffer enter image description here

v.to.lines with delauney - draws lines from each vertices to another enter image description here

create negative buffer of original by 5 meters enter image description here

clip v.to.lines output with negative buffer to remove external lines - this leaves only lines crossing interstate. enter image description here

GDAL points to lines at .5 - puts a point halfway on each line crossing interstate which gives you center points.
enter image description here

Now you need a simple line to add values for points to paths since the point values in the layer can be random. You can use one side of the interstate layer if needed. Here's the instructions on how to do it. The reference line needs to be a single line. You may have to run the join multiple lines plug in if you are using the interstate layer.

Run points to paths and you have a nice center line. This method does not require a lot of processing power but you may be sacrificing a bit of accuracy. You will want to clean up some stray points on the ends before running points to paths.

enter image description here

Related Question