I have two shape files with lines: one has 41k+ lines and the other has 606 lines. Lines from these layers often overlap. I want to use the second one as a mask to clip lines from the first one so I have a layer with around 40,5k with overlapping features deleted. I have tried "Difference" and "Symmetrical difference" operations in QGIS but they didn't work for me. How can I do it then?

  • 1
    Have you made sure, the lines are in the exact same spots?
    – Erik
    Jul 10, 2019 at 7:31
  • @Erik I thought I was sure everything is perfectly aligned but at the most minimal scale they are in slightly different spots. That's the problem, thanks for helping me find it!
    – NecroSith
    Jul 10, 2019 at 9:58

1 Answer 1


You may be able to accomplish this, using the clip function and a buffer. If you place a very thight buffer and delete everything that either touches it or is completly encased you may get your results.

  • Yes! It helped! There was a tiny distance between the lines from different layers, I created a buffer and it worked like a charm. Thank you!
    – NecroSith
    Jul 10, 2019 at 10:13

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.