Here I have two lines in QGIS. There is a part when they overlap. I want to merge them so it will be one line in the middle.

enter image description here I have tried the solutions already mentioned previously but no success. What I tried:

This is what I want to get:

enter image description here

How do I merge them?

  • What happens when you use v.clean with snap?
    – Erik
    Nov 26, 2019 at 11:51
  • @Erik , when I use v.clean with snap I produces a lot of noise.... This is what I get imgur.com/a/GvXzBzr
    – Ad Blu
    Nov 26, 2019 at 11:57
  • 2
    For the overlap part you could try one of my two solutions: gis.stackexchange.com/questions/123731/…
    – Stefan
    Nov 26, 2019 at 12:32
  • Your desired tool is available in QGIS 3 as "Snap geometries to layer" in Processing Tool Box. Please, see my answer.
    – xunilk
    Nov 26, 2019 at 16:28

1 Answer 1


Your tool is "Snap geometries to layer" (only in QGIS 3) from Processing Tool Box.

For testing purpose, I created two lines similar to your layers; as it can be observed in following image (scale 1:1000):

enter image description here

Afterward, I launch that tool with parameters of following image (for my scale, adequate tolerance is 8 m):

enter image description here

After running it, I got:

enter image description here

whose result was merged as expected (line 1 was unchecked in Map Legend for better visualization).

  • the problem I have is that: imgur.com/a/qFqBYMT I want to perform that operation on one layer generalized [17], which have 17 features/lines. When I do that, Im getting the red trail.
    – Ad Blu
    Nov 26, 2019 at 16:33

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.