Detects corridor behaviour by finding segments where the animal moves quickly in a spatially consistent direction. Corridors are characterised by high segment speed combined with low circular variance of travel direction among spatially neighbouring segments.
Value
The input move2 object with five added columns:
corridorfactor with levels
"corridor"and"not corridor".corridor_speedper-segment speed (m/s).
corridor_azimuthper-segment travel azimuth (degrees).
corridor_circvarcircular variance of pseudo-azimuths within the neighbourhood.
corridor_n_neighboursnumber of segments found within the search radius.
The last row of each per-segment column is NA because there are
one fewer segments than locations.
Details
The algorithm is:
Compute segment midpoints on the sphere and their half-lengths (used as a per-segment search radius).
For each segment, find all other midpoints within its search radius via an
sfspatial index (R-tree) in a local azimuthal-equidistant projection.Compute a pseudo-azimuth (
azimuth * 2 mod 360) so parallel opposite directions collapse onto the same value — two animals walking north and south along the same corridor are treated as consistent.Compute the circular variance of pseudo-azimuths within each neighbourhood.
Classify a segment as corridor if its speed exceeds the
speed_quantilethreshold, its circular variance is below thecirc_quantilethreshold, and the corridor-qualifying neighbours within its search radius outnumber the non-qualifying neighbours (at leastmin_segmentsqualifying neighbours are required).
This is a port of the move::corridor() concept (LaPoint et al. 2013)
to the move2 / sf stack, using modern spatial indexing.
References
LaPoint S, Gallery P, Wikelski M, Kays R (2013). Animal behavior, cost-based corridor models, and real corridors. Landscape Ecology, 28, 1615–1630. doi:10.1007/s10980-013-9910-0
Examples
if (FALSE) { # \dontrun{
library(move2)
fishers <- mt_read(mt_example())
fishers <- fishers[!sf::st_is_empty(fishers), ]
## corridor detection expects geographic coordinates
leroy <- fishers[mt_track_id(fishers) == "Leroy", ]
leroy <- sf::st_transform(leroy, 4326)
out <- mt_corridor(leroy)
table(out$corridor)
} # }