I have a road network in the form of a line, that I need split up into sections, if a polygon intercepts.
This is fairly straight forward, but I have several layers of polygons where I need the full extent of the line, if it is continuous across several polygon layers.
I've tried to illustrate this with a picture, what I need is basically all the lines marked with Red on the picture, to be a separate new line.
As the picture shows, sometimes only a green polygon intersects, but other times it's a green polygon followed by a purple, and then I need it to be a full line across the several polygons. What is the easiest way to achieve this in QGIS?