I have a straight line which runs through a bunch of polygons, which don't have spacing between them (border to border).

Is there an easy way with QGIS to calculate which polygons it passes and by what percentage of the total distance its within these polygons?

I'm using Ubuntu, QGIS 1.8.

1 Answer 1


I would go on step by step.

  • Calculate the length of your lines and add it to the attribute table. Open the field calculator in the attribute table and add a new field calculating the length of the lines (geometry code $length).
  • Cut your lines with your polygons in a way that you get a layer with only the intersecting parts.
  • Calculate the length for those intersecting parts again and use the field calculator to calculate the intersecting percentage.
  • thx, now I do have a way where to search/learn, guiding to the result :-) Jan 3, 2013 at 19:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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