Description Usage Arguments Details Value See Also Examples
Remote sensing oriented sampling of stops along a movement track.
1 2 3 4 5 6 7 | sampleMove(
xy,
obs.time,
search.radius,
distance.method = "m",
time.unit = NULL
)
|
xy |
Object of class SpatialPoints or SpatialPointsDataFrame. |
obs.time |
Object of class Date, POSIXlt or POSIXct with the same length as xy. |
search.radius |
Numeric element with search radius (in meters). |
distance.method |
How should the distance be estimated? One of 'm' or 'deg'. Default is 'm'. |
time.unit |
Time unit to estimate elapsed time. See |
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.
A SpatialPointsDataFrame.
labelSample
backSample
dataQuery
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | {
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)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.