Merging lines with slightly different endpoints in QGIS

You can accomplish this with a combination of QGIS and GRASS.

  1. Import your vector layer into a GRASS mapset ( Grass | File > Import Vector Data )
  2. Open your mapset in QGIS ( QGIS | Plugins > GRASS > Open mapset )
  3. Add vector layer from your GRASS mapset to your QGIS project ( QGIS | Plugins > GRASS > Add GRASS vector layer )
  4. Use v.clean.snap ( QGIS | Plugins > GRASS > Open GRASS tools > Modules List > v.clean.snap )

Adjust the v.clean.snap 'threshold' to attain proper vertex snapping throughout study area.


Quick answer: no! There's no tool like that to do that operation directly on the layer (the "Join Two Lines" plugin requires intersection).

You could do it for a very simple layer by turning the lines to points (extract nodes) then joining with points2one (line output) but this would be MUCH slower than just editing by hand:

  1. Make sure you have snapping (Settings|Snapping options ...) turned on for your line layer (5 pixels works well for me).
  2. Create a new line from one endpoint to the other.
  3. Select all three lines (the two original lines + the new one) and merge them (Edit|Merge selected features or toolbar button).

I assume you are wanting to join two line segments into one line. enter image description here

This is how I did it ...

  • Enable editing.
  • Turn on snapping ( Settings -> Snapping Options ... ) enter image description here
  • Select the node node tool.enter image description here
  • Double click close to the end of one of the lines to add a node. enter image description here
  • Drag the node at the end to snap onto the the end of the other line enter image description here
  • Select both lines
  • Merge their attributes ( you cannot make therm one line if they have differing attributes)enter image description here
  • Merge the two featuresenter image description here

This should result in one line. enter image description here