3

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

8
  • It looks like GRASS's v.centerline does exactly what you want. I searched "centerline" in QGIS 3 plugins and saw that the HCMGIS plugin offers "Centerline for road/ river networks ". Worth checking out.
    – Jon
    Sep 28, 2018 at 18:24
  • I thought so however I'm having a hell of a time getting it working. I can't install qgis 3 at the moment since I'm in the middle of a project and I have a lot of models built on 2.18 that won't transfer. gis.stackexchange.com/questions/297155/…
    – brink
    Sep 28, 2018 at 18:26
  • You can have more than one version of QGIS installed at a time.
    – csk
    Sep 28, 2018 at 21:48
  • The plugin Digitizing tools has a tool called "digitize median line between adjacent polygons." So you would just need a way to turn your lines into polygons (perhaps with one-sided buffers).
    – csk
    Sep 28, 2018 at 21:55
  • @csk any idea on how it works? All I can get it to do is draw a line from one node to another, sometimes...
    – brink
    Sep 28, 2018 at 22:54

1 Answer 1

1

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

9
  • In the example above, the centerline will not be accurate (correct), if the user is satisfied with this approximation, then this is also one of the ways to create the centerline Oct 3, 2018 at 15:35
  • @Cyril If you have a more accurate way of doing this that doesn't take a long time to process I'd like to know. I could never finish my project with the solutions that I found given the processing time. So far I'm working with about a 3-5 meter accuracy which is about as accurate at the interstate layer I'm using.
    – brink
    Oct 3, 2018 at 16:07
  • If you're interested, check out this method gis.stackexchange.com/questions/290805/… Oct 3, 2018 at 16:10
  • @Cyril I tried it. That method only works for uniform lines. Interstates don't stay parallel which throws off the point buffers.
    – brink
    Oct 3, 2018 at 16:19
  • In your case, you need to divide the electronic map object (Interstate channels) into different types and process each type separately...however, automatically perform such an operation will be difficult... Oct 3, 2018 at 17:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.