Last chance! 50% off unlimited learning
Sale ends in
Remote sensing oriented sampling of stops along a movement track.
sampleMove(xy, obs.time, search.radius, distance.method = "m",
time.unit = NULL)
Object of class SpatialPoints or SpatialPointsDataFrame.
Object of class Date, POSIXlt or POSIXct with the same length as xy.
Numeric element with search radius (in meters).
How should the distance be estimated? One of 'm' or 'deg'. Default is 'm'.
Time unit to estimate elapsed time. See difftime
for keywords. Default is mins.
A SpatialPointsDataFrame.
This function finds location where an animal showed little or no movement based on GPS tracking data. It looks at the distance among consecutive samples and identifies the start of a segment when the distance is bellow search.radius. When a segment is started, the function looks at the distance between the starting point and the following observations are assigned to the same segment until the threshold is exceeded. When this occurs, the function summarizes the observations assigned to the segment deriving mean coordinates, the start, end and total time spent and the total number of observations per segment. The user should selected distance.method in accordance with the projection system associated to the data. If 'm', the function bases this analysis on the the ecludian distance. However, if 'deg' it set, the function uses the haversine formula. The final output is a SpatialPointsDataFrame containing the following information:
x - X coordinate.
y - Y coordinate.
start.time - Start time of segment.
end.time - End time of segment.
total.time - Elapsed time within the segment.
nr.samples - Number of observations.
# NOT RUN {
{
require(raster)
# reference data
data(longMove)
# sampling without reference grid
obs.time = strptime(longMove$timestamp, "%Y-%m-%d %H:%M:%S")
output <- sampleMove(longMove, obs.time, 7, distance.method='deg')
# compare original vs new samples
plot(longMove, col="black", pch=16)
points(output$x, output$y, col="red", pch=15)
}
# }
Run the code above in your browser using DataLab