4

After I smoothed a layer of lines I lost the connection with some vertices.

enter image description here

Is there an automatic way to connect the various lines to avoid doing it manually?

enter image description here

I think the best thing is to use v.clean but I am not sure of the right parameters that should be set.

4

You can try "Snap geometries to layer" from Processing Toolbox. You can select the same layer as input and reference.

In your case I would try the "Behavior" (Move end points only), as well as a suiting "Tolerance".

enter image description here

3
  • I'm trying to enter a tolerance of 0.010000 because I didn't get any results with that in your example
    – ddomizia
    Nov 23 '20 at 17:14
  • 2
    @ddomizia Don't look at my example in that case. I just quickly drew some lines over the world using degrees. From your screenshot I assume you are using UTM and therefore meters, choose a suiting tolerance for your case. Seeing your scale and assuming you are using a "normal" display, I'd say something between 1m and 10m. But this also depends on your chosen behavior and where the next vertex is. Just play a little with the settings.
    – MrXsquared
    Nov 23 '20 at 17:25
  • Okay, I have to thank you! After all the right parameters for my layer were "Tolerance: 25,00000000" and "Behavior: Prefer closest points insert extra vertices where required". With your solution my layer keeps all attributes and above all I don't notice any errors in the geometries. The result obtained with the GRASS v.clean tool was unfortunately very bad.
    – ddomizia
    Nov 23 '20 at 18:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.