Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was wondering if there is a way to create centre lines from polygons in QGIS? I have a polygon layer, but ideally need the centrelines as a separate file.


share|improve this question
I've just uploaded a picture of the polygons – Alan Carr Sep 20 '12 at 10:39
Where, in the example image, would the 'centrelines' fall? Could you update the image showing the desired lines in a different colour, perhaps? – Simbamangu Sep 20 '12 at 10:55
Just directly down the middle of all polygons. The final outcome we need would be to just find the length of the whole thing (assuming the polygons were lines) so it's not even essential to get centrelines. – Alan Carr Sep 20 '12 at 11:09

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

share|improve this answer
What other programs can you do this on. I can get access to MapInfo and Arc if neccessary – Alan Carr Sep 20 '12 at 11:35
this algorithme, will work surely in Arcgis and it could work too in Qgis using Voronoi polygons – geogeek Sep 20 '12 at 11:39

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

enter image description here

share|improve this answer

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.

rthin i hope it helps you...

share|improve this answer
this is a ready to use tool, thanks – geogeek Sep 20 '12 at 11:49

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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