I'm trying to substract one layer with multilinestring lines from another one. However, the layer that I get does have some (parts of) lines substracted, but not all. Does anyone know another tool that I could try or know a fix?

I want to substract layer GBB_Bagpand (B, Green) from Gasleidingen_buiten_bedrijf (A, Black).

enter image description here

enter image description here

In the picture below I show the 3 layers (All multistring lines, but with different thickness @symbology for explaining the picture).

Black line is A, Green Line is B, Purple line Should be A-B, but clearly isn't.

enter image description here

EDIT: Suggestion to use Flat end caps in a buffer@ line B, before using the difference tool seems to solve 95% of the problem. Still looking for the 100% though, maybe it's the input values I put in the buffer?

enter image description here

  • 1
    Have you tried buffering line B with flat endcaps and then running difference?
    – Erik
    Commented Mar 21, 2022 at 9:06
  • Not yet, what other parameters should I fill in? Distance @ 0,05 meter or something?
    – Yelper
    Commented Mar 21, 2022 at 9:14
  • Seems to improve the result 95%. Still have minor overlap I think. I will upload a photo in the main post.
    – Yelper
    Commented Mar 21, 2022 at 9:17
  • Isn't the overlap in your latest image just visual, caused by the thickness of the line symbology? What is the position of the vertices?
    – Matt
    Commented Mar 21, 2022 at 10:04
  • I'm a bit new to GIS, so not sure how to check this. Could you please explain step by step how to do this for me?
    – Yelper
    Commented Mar 21, 2022 at 10:33

1 Answer 1


Erik and Matt were right, placing a buffer with a flat end cap worked! The overlap in the Edit in the question is visual.

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.