0

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?

enter image description here

5
  • 1
    If you also want to ask about PostGIS and/or PyQGIS then I think that is best done in separate questions, and in those I think you should include your code attempts.
    – PolyGeo
    Commented Jun 5, 2021 at 5:47
  • For now, I just want to know the tools that i can use to complete this task. Commented Jun 5, 2021 at 6:37
  • 2
    There is no tool. You can use clip vector for inside lines. Better way intersect line with buffer and select which lines are within and inverse selection which lines are out of buffer.
    – Frodo
    Commented Jun 5, 2021 at 7:22
  • how does the inverse selection work can i please know? Commented Jun 5, 2021 at 17:41
  • you need to carry out intersections to make the line segments of interest
    – BJW
    Commented Jun 5, 2021 at 22:47

0

Your Answer

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

Browse other questions tagged or ask your own question.