I was developing a plugin in which there is a polygon buffer and line file, now i want to to find all the line segments that are outside the buffer and inside the buffer. Is there anyway to find them using QGIS tools. I want to save the line segment for every time it is outside and inside. I am attaching a pic for better clarity.
In the image below, i want the ones in red circle as different color, for example purple and black color and the one in blue circle as different color, maybe magenta color, and i want to do this with all the line polygons in the shapefile.
Can you help me if you have an idea?