Skip to content
Prev 5119 / 7420 Next

Compute the distance between the trajectories of two animals with varying sampling intervals

Hi Andr?,

Yes, that's one way to do it. If you already have a single ltraj with all 
individuals (one individual per burst), you can simply give it the ltraj 
alone. With a single ltraj, the function looks for the closest point in 
other bursts. Check the example of the function.

Note that I do not guarantee that my function is efficient! This is R: 
there is no use of spatial indexes or bounding boxes, so that for each 
point, distances are computed to all other points in the temporal window. 
Depending on your data, I guess it could be fairly slow...

Again, if you're looking for performance and/or robustness, I would give a 
try to PostGIS here.
Mathieu.


Le 22/07/2015 15:31, Andr? Zehnder a ?crit :