tgrw: Interpolate using time geographic constrained random walk

Description Usage Arguments Details Value References Examples

View source: R/tgrw.r

Description

Perform path interpolation using the constrained random walk method outlined in the paper by Technitis et al. (2015), as implemented in the paper by Long (2015).

Usage

1
tgrw(xyt, t.slice, vmax = NA)

Arguments

xyt

a 2x3 dataframe containing the coordinates and times of the two points to be interpolated between, often termed the anchor points of the space-prism. Each row of the dataframe should be arranged as x, y, t.

t.slice

a single time (POSIX or numeric), or list of times, to be interpolated for. The times must lie between those of the points in xyt.

vmax

parameter controlling the bounds of the constrained random walk. Default value is 1.5 x d/t where d is the distance between the anchor points and t the time difference.

Details

Many moving objects exhibit movement properties that can be modelled via random walks. Thus, in many cases it is of interest to use random walks as a model for path interpolation. The time geographic constraned random walk is a special case of the random walk, wherby the interpolation is constrained by the space-time prism. The size of the space-time prism is controlled by the parameter vmax, which sets how far the interpolation is allowed to 'wander'. For more details, please see Technitis et al. (2015).

Value

The function returns a dataframe (with nrow = length{t.slice}) corresponding to the interpolated locations.

References

Long, JA (2015) Kinematic interpolation of movement data. International Journal of Geographical Information Science. DOI: 10.1080/13658816.2015.1081909.

Technitis, G. et al. (2015) From A to B, randomly: A point-to-point random trajectory generator for animal movement. International Journal of Geographical Information Science. 29(6): 912-934.

Examples

1
2
3
4
5
6
7
data(contrived)
xyt <- contrived
###times for interpolation
t.slice <- c(1.5,2,2.5,3,3.5,4,4.5,5,5.5)
a <- tgrw(xyt[2:3,],t.slice,vmax=6)
plot(xyt[,1],xyt[,2],pch=20)
points(a[,1],a[,2])

jedalong/PathInterpolatR documentation built on May 19, 2019, 12:40 a.m.