4

I have "unsorted" points from various sources - steming from a hiking track / path.

How can I create one line from the closest points (...following the track). I´ve already imported all points to one layer, but I´m not able to create a proper line.

MrXsquared
  • 34,292
  • 21
  • 67
  • 117
Jona
  • 41
  • 1
  • 2
    What have you tried so far? The Points2One plugin for example? More on Points2One and some additional suggestions can be found in answers to this question: https://gis.stackexchange.com/questions/92751/draw-lines-from-points-in-qgis – humperderp Nov 03 '19 at 18:45
  • Try using a snapping algorithm (v.snap for instance) to snap the path to the points. – csk Nov 04 '19 at 16:21
  • Thank you for your comments: Point2One ist not available for Qgis 3.8 – Jona Nov 09 '19 at 10:42
  • I don´t have a line (path) so I can´t use snap tools – Jona Nov 09 '19 at 10:43

1 Answers1

1

Here is one option using the Distance matrix tool and the PointConnector plugin. This is provided you have the points in one layer and that the goal is to connect by closest neighbours.

  1. Start by creating a distance matrix for your point layer. Set both input and target layer to your points, set "Use only the nearest (k) target points" to 1 and save the result as a .csv file.

  2. Then use the PointConnector plugin, setting "Point" to your point layer, and "From-to" to the distance matrix.

Here is a screenshot of the result of running the above steps on a few test points named "points", as seen in the layer tab. The steps taken have been outlined and numbered. enter image description here

humperderp
  • 837
  • 5
  • 14