Function to filter spatial duplicates in tracking data.
dupfilter_space(sdata, step.time = 0, step.dist = 0, conditional = FALSE)
A data frame containing columns with the following headers: "id", "DateTime", "lat", "lon", "qi".
The function filters the input data by the unique "id".
"DateTime" is date & time in class POSIXct
.
"lat" and "lon" are the latitude and longitude of each location in decimal degrees.
"qi" is the numerical quality index associated with each location fix where a greater number indicates a higher accuracy
(e.g. the number of GPS satellites involved in estimation).
Consecutive locations less than or equal to step.time apart are considered temporal duplicates. Default is 0 hours.
Consecutive locations less than or equal to step.dist apart are considered spatial duplicates. Default is 0 kilometres.
If TRUE, spatial duplicates are filtered only if they are less than or equal to step.time apart. Default is FALSE.
The input data frame is returned with spatial duplicates removed.
This function is a partial component of dupfilter
, although works as a stand-alone function.
First it identifies spatial duplicates by searching for consecutive fixes that were located within step.dist.
For each group of spatial duplicates, the function then retains a single fix that is nearest from a previous and to a subsequent location.
Shimada T, Limpus C, Jones R, Hazel J, Groom R, Hamann M (2016) Sea turtles return home after intentional displacement from coastal foraging areas. Marine Biology 163:1-14 doi:10.1007/s00227-015-2771-0
dupfilter
, dupfilter_exact
, dupfilter_time
, dupfilter_qi
, track_param