I'm currently working on bird's data. I have coordinates of observation points and I'd like to measure the distance between points following a path. The given bird is probably moving from point to point therefore euclidean distance between 2 points is probably far from real distances.
Let's imagine I have 3 sites : A,B and C. B is between A and C: For going from A to C, the bird walk A → B → C so the distance AC is given by the sum of distances AB + BC.
I'm looking for the mean of getting quickly all possible distances: AB, BC and AC. I'm used to QGIS.
Of course, I could simply do the sum of euclidean distances myself but I have 15 points so it would be so long to get the distances for all points' couple.
Do you have an idea of how to do it automatically ?
Best Answer
Another approach by a
Virtual Layer
.Given you are working on avian movement, I assumed the data is on geographical coordinates (LatLong).
1) Created a dummy data.(The layer name is
PointLayer1
)2)
Layer | Add Layer | Add Virtual Layer
PointLayer1
Query:
Which gives a virtual layer (please open the attribute table) with each flight distance (kilometers) between A and B.
As you need the total flight length, modify the syntax slightly to:
It will give you something like:
When you use the syntax, please replace the
PointLayer1
by your layer, andloc
by your field to identify the order of stop points.3) Run scenarios
You can modify order of points by changing
loc
field. When you change theloc
then the virtual layer will update the calculation.