Skip to contents

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.

Usage

mt_corridor(x, speed_quantile = 0.75, circ_quantile = 0.25, min_segments = 2)

Arguments

x

A move2 object in geographic coordinates (EPSG:4326).

speed_quantile

Speed threshold quantile (default 0.75).

circ_quantile

Circular-variance threshold quantile (default 0.25).

min_segments

Minimum number of qualifying neighbours required for a segment to be classified as a corridor (default 2).

Value

The input move2 object with five added columns:

corridor

factor with levels "corridor" and "not corridor".

corridor_speed

per-segment speed (m/s).

corridor_azimuth

per-segment travel azimuth (degrees).

corridor_circvar

circular variance of pseudo-azimuths within the neighbourhood.

corridor_n_neighbours

number 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:

  1. Compute segment midpoints on the sphere and their half-lengths (used as a per-segment search radius).

  2. For each segment, find all other midpoints within its search radius via an sf spatial index (R-tree) in a local azimuthal-equidistant projection.

  3. 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.

  4. Compute the circular variance of pseudo-azimuths within each neighbourhood.

  5. Classify a segment as corridor if its speed exceeds the speed_quantile threshold, its circular variance is below the circ_quantile threshold, and the corridor-qualifying neighbours within its search radius outnumber the non-qualifying neighbours (at least min_segments qualifying 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)
} # }