16

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

Taras
  • 32,823
  • 4
  • 66
  • 137
wallace camelo
  • 161
  • 1
  • 1
  • 3

3 Answers3

18

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 ...

Cyril Mikhalchenko
  • 4,397
  • 7
  • 14
  • 45
6

The HCMGIS plugin says it does this:

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

Compatible with QGIS 3 and later; not compatible with QGIS 2.

csk
  • 24,827
  • 3
  • 32
  • 70
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.

wfgeo
  • 3,538
  • 2
  • 24
  • 47
  • 2
    Can you explain how to use it in QGIS? – MrXsquared Apr 14 '19 at 14:21
  • 2
    @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 '19 at 14:45