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.