Is it possible in QGIS to split a line into segments given which polygon it falls within? I am using 2.8.

For example, a line that passes through three polygons will become three separate lines. Each time it crosses from one polygon into another it'd become a new line.

So in this case, where the green is a line, I would like to split it into three separate lines. Once for each time it crosses the black border of a polygon.

Line to be split

  • 1
    This is the basic geoprocessing operation called Intersection - You can find it under top menu: Vector / Geoprocessing tools / Intersect...
    – Miro
    Aug 6, 2015 at 0:34

1 Answer 1


[QGIS 2.8] Use the Intersect tool menu : "Vector / Geoprocessing tools / Intersect" (from Miro's answer in comments)

[QGIS 2.18] Use the Intersection Tool in the processing toolbox/panel :

Intersect tool

This algorithm extracts the overlapping portions of features in the Input and Intersect layers. Features in the Intersection layer are assigned the attributes of the overlapping features from both the Input and Intersect layers. Attributes are not modified.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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