2

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?

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
Ad Blu
  • 75
  • 5
  • What happens when you use v.clean with snap? – Erik Nov 26 '19 at 11:51
  • @Erik , when I use v.clean with snap I produces a lot of noise.... This is what I get https://imgur.com/a/GvXzBzr – Ad Blu Nov 26 '19 at 11:57
  • 2
    For the overlap part you could try one of my two solutions: https://gis.stackexchange.com/questions/123731/create-mean-line-from-multiple-lines-using-qgis/271532#271532 – Stefan Nov 26 '19 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 '19 at 16:28

1 Answers1

3

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).

xunilk
  • 29,891
  • 4
  • 41
  • 80
  • the problem I have is that: https://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 '19 at 16:33