3

I have a graph layer and a point layer. The points are snapped to the graph. I want to get the distance between the closest points on the graph

enter image description here

2

1 Answer 1

6

Solution 1: Beeline distance

Use distance matrix tool for a quick and dirty solution: ignoring the network, just beeline distance (for using network, see below). At least from your screenshot, this should be more or less the same for the shortest distance.

Run Menu Processing > Toolbox > Distance Matrix and use the same layer for Input and Target point layer. Open the attribute table of the the resulting layer and sort the column Distance to get the shortest distance: InputID and TargetID shows you the point pair that has the smallest distance in between:

enter image description here

Solution 2: Distance over network

To do the same, but using network distances, use the plugin QNEAT3 and run one of the OD Matrix tools like OD-Matrix from Points as Table (n:n).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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