4

I have a layer that represents a road network. The lines for the roads don't always meet, but I want them to.Initial layer

I want to make the pink lines join to the nearest segment of the blue line. I followed the instructions to clean and snap in GRASS, but I get this result: Wrong Result

I don't want the small angles that are created where the blue line is distorted. I would like to make the pink line extend to meet the blue line.

Can anyone help?

2
  • Not GRASS+QGIS answer; OpenJUMP-Plus has a plugin Network topology cleaning Tool which hooks them up and snaps at the connections. (...just in case).
    – Kazuhito
    Commented Aug 22, 2017 at 4:31
  • There is a another method here. However, I'm not sure if this can be automated: gis.stackexchange.com/questions/151764/…
    – jbalk
    Commented Aug 22, 2017 at 4:33

2 Answers 2

1

You can use QAD Plugin it has extend tool that you can use to snap oink lines to the blue lines.

enter image description here

The QAD plugins gives you the capability of AutoCAD editing tools into QGIS. The only drawback is that you have to select the lines that you want to extend manually.

4
  • There are some good ideas here and I will examine them in turn. I am concerned that there are no suggestions - yet - for an automated process. The example I gave is only a small fraction of the number of roads that I have to deal with. I would prefer an automated solution.
    – Johanna
    Commented Aug 22, 2017 at 5:19
  • Kosmos is OK, but seeing that I have thousands of road segments, applying the changes manually is not a suitable answer. OpenJump seemed OK, but there were problems with an exception error that I was not able to resolve. The QAD plugin is also not an option because it needs manual intervention.
    – Johanna
    Commented Aug 22, 2017 at 8:03
  • Try to use "Remove small angles between lines at nodes" which is located under GRASS v.Clean, and choose tool=rmsa. I think this is the solution to your problem based on GRASS help: grass.osgeo.org/grass73/manuals/v.clean.html
    – ahmadhanb
    Commented Aug 22, 2017 at 8:19
  • I tried the Remove Small Angles tool, but that is not what is needed. The small angles it refers to are those that are functionally equivalent to 0. My angles are between 45 and 70 degrees. I tried Remove Small Area tool as well. Still no joy.
    – Johanna
    Commented Aug 22, 2017 at 22:56
0

I was able to resolve this problem by using the Snap and Thin Tool in MapInfo.

The results that I obtained were far closer to what I needed as an end product - despite the fact that I still could not use the hierarchy as a way of determining the priority of the shift.

I ran the tool with a 10 metre snapping tolerance, and then ran it again with a 20 metre tolerance to achieve a final result that connected all my lines. I turned the Thinning component off.

Thank you for all the ideas that assisted with this.

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.