I was wondering if there is a way to create center lines from polygons in QGIS?
I have a polygon layer, but ideally need the centerlines as a separate file.
I was wondering if there is a way to create center lines from polygons in QGIS?
I have a polygon layer, but ideally need the centerlines as a separate file.
I've been working on implementing the model depicted in @RajGovind's answer to Creating Centrelines from Road Polygons/Casings? which is quite close to what @geogeek described in his answer here in this thread.
You can download the model from Github https://raw.githubusercontent.com/anitagraser/QGIS-Processing-tools/master/2.12/models/polygon_to_centerline.model
you can try This algorithme:
get vertices from the polygons(poly_vertex).
-make voronoi using (poly_vertex) as input the result could be called(poly_voronoi).
-get lines from (poly_voronoi) => (poly_voronoi_lines).
-get the originale polygon contour (polygon_lines).
-remove (poly_voronoi_lines) touching (polygon_lines) the result is supposed to be the center lines , but you may need further clean up.
i don't know how it could be implemented on Qgis
i wish it could help
there is a good tool with the name of ET GeoWizards 10.2 for Esri products, but i dont know whether it is a good solution or not...
you can get some info from here
beside this in grass you can check out r.thin function for basic use..
r.thin - Thins non-zero cells that denote linear features in a raster map layer.
i hope it helps you...
A few days ago, I was researching a more productive way to extract centerlines and I came across this QGIS plugin: Geo Simplification (https://plugins.qgis.org/plugins/geo_sim_processing/)
At https://github.com/NRCan/geo_sim_processing you can get more information about the algorithm implemented in the plugin to extract centerlines (Chordal Axis).
I tested it in a few cases and got good results. I think is a good option.
Here you can check a result obtained with the plugin.
I hope this can help you guys!
The option "correction" creates a real centre-line while omitting it creates multiples lines from each vertex towards the center similar to a Voronoi polygon.
just find the length of the whole thing
How exactly should be the result? An approximation is perimeter divided by 2.
To get a better result: You can manually measure some polygons.Then determine the difference between the measurement and perimeter divided by 2. Apply this correctionfactor to the whole datset.
The GRASS Tool v.voronoi.skeleton in QGIS does what you are looking for. The algorythm works similarly to the solution posted here: Creating centerline of river in QGIS?