7

This question already has an answer here:

I made two river bank lines and I want to associate them.

Example_1

I want to make a centerline using two rows as a base. I managed to make the centre line with a lot of work creating several lines from one margin to the other of the river and then using the centroid, but this solution is very tiring and I have to do this in several areas.

Example_2

marked as duplicate by Jochen Schwarze, whyzar, ArMoraer, Simbamangu, Erik Apr 17 at 8:40

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    I think after 6 years a new question is legit and answers provided are not up to date for version 3 – MrXsquared Apr 16 at 20:49
  • Yeah, but this question als is 5 years old. – Erik Apr 17 at 8:40
  • @Erik it was asked 3 days ago (2019-04-14) – MrXsquared Apr 17 at 13:50
  • Yeah, I thought April 14 = April 2014 -.- – Erik Apr 17 at 15:18
6

The surest method for solving your question from the point of view of the cartographic approach is to use the Voronoi Polygons.

I offer one of the solutions to your question using QGIS tools.

So, the initial data is a river as an areal object, see the figure below. enter image description here

2) Vector > Geometry processing > Convert polygons into lines, see image below enter image description here

3) Open the closed line QGIS "Split Features" tool and run the GRASS v.split tool, so that the points are evenly distributed along the line and run the Vector> Geometry Processing> Voronoi Polygons tool on them, see the figure below

enter image description here

or run the plugin with the name in the screenshot below, which is more convenient ... enter image description here

4) Cut the original Voronoi polygons from the result with Vector > Geoprocessing > Trim and then select only one half of the river area, see the picture below using the Ctrl key and the selection tool enter image description here more Vector > Geoprocessing > Merge by grounds ... > By all indications.

enter image description here

enter image description here

5) Cut from the source layer the result of the selected left or the right area, see the picture below.

enter image description here

6) Then from the result of cutting create a line, blow it up, remove unnecessary parts and leave the centre line of the river, see figure below enter image description here

This is the main approach to solving your question and it is clear that a variety of tools allows you to solve your question in various ways, but the idea remains the same, good luck ...

3

Try the GRASS algorithm v.centerline. You may have to tweak around with the parameters, but as long as your river polygons are longer than they are wide it should work for a large portion of your inputs.

  • 1
    Can you explain how to use it in QGIS? – MrXsquared Apr 14 at 14:21
  • 1
    @MrXsquared I am actually now surprised to find that this tool is not accessible from the Geoprocessing toolbox, so I guess my answer is not that appropriate to the question. – wfgeo Apr 14 at 14:45
1

The HCMGIS plugin says it does this:

Spatial Processing: Create Skeleton/Medial Axis/ Centerline for road/ river networks and similar linear structures

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