locationsTrack: Identifies and classifies visits in GPS tracks.

Description Usage Arguments Details Value See Also Examples

View source: R/locationsTrack.R

Description

locationsTrack identifies clusters (locations) of points in GPS tracks (Track object) based on their spatial proximity using extractClustersBuffer and identifies individual visits of the same cluster (location) along the track. Additionally, visits are classified as long-term visits (campsites) or short-term visits. During the identification of clusters, data values within a user defined daily time interval are considered. The remaining values are set to the next location identified for the adjacent time intervals. This procedure can be used in order to identify campsites by assuming that a household has a campsite where it stayed over night. If values outside the defined time interval have a too far distance, they are classified as short-term visit.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
locationsTrack(
  currenttrack,
  radius = 800,
  tmin = 345600,
  tmaxinterstices = 345600,
  night = c(16, 20),
  tmaxintersticenotvalid = data.frame(start = as.POSIXct("2016-01-01 00:00:00"), end =
    as.POSIXct("2016-05-01 00:00:00")),
  summary = TRUE
)

Arguments

currenttrack

A Track object.

radius

A numerical value representing the radius of the buffers computed around each point [m] which are used for clustering values to locations. Default is radius = 800 [m].

tmin

The minimum residence time at a specific location [s] which is used to classify visits as campsites (if the residence time at a specific location is larger than tmin) in contrast to short-term visits of locations. The default is tmin = 345600, i.e. 4 days.

tmaxinterstices

The maximum time between subsequent visits at the same location in case of which the duration of these visits will be added in order to classify both visits together as long-term visit (campsite) or short-term visit, based on tmin.

night

An integer vector with two elements: The first element specifies the start hour of the night, e.g. 0 for 0 o'clock. The second element specifies the start hour of the night, e.g. 4 for 4 o'clock.

tmaxintersticenotvalid

A data.frame object that defines time periods in which the argument tmaxinterstice will be ignored, i.e. visits at the same location are merged irrespective of the duration between these visits if there is no campsite visit at a different location in-between. Each row indicates a time period in which this should be valid. tmaxintersticenotvalid must contain two columns:

start

Represents the start time of the time interval.

end

Represents the end time of the time interval.

It is evaluated for each visit if its endtime (trackvisits$endtime) is within any of the time periods or the starttime (trackvisits$starttime) of the next visit at the same location.

summary

Logical value indicating if the information on the locations and visits should be summarised (summary = TRUE) or not (summary = FALSE). See the details section for further information.

Details

The function can be used in order to assign to each data value of the input Track object an id of the cluster it is assigned to ( summary = FALSE) or to summarise the information for each visit of a location (summary = TRUE).

Value

If (summary = FALSE)

A Track object that is identical to the input Track object, but has five additional columns in the data slot:

location

A numeric integer value for each identified spatial point cluster (location) increasing with the time starting.

visit

A numeric integer value for each identified visit increasing with the time starting.

campsite

A logical value indicating if a visits of a location is classified as long-term visit (campsite) (TRUE) or as short-term visit (FALSE).

norepeatedcampsitevisits

An integer vector indicating the number of campsites at a specific location the data point is assigned to until the current visit.

start

A logical vector indicating if a value represents the first value of a visit (start = TRUE) or not (start = FALSE).

end

A logical vector indicating if a value represents the last value of a visit (end = TRUE) or not (end = FALSE).

Gaps, as indicated by the column gap, have NA values for location, campsite, norepeatedcampsitevisits and FALSE values for start and end.

If (summary = TRUE)

An object of class trackvisits summarising the locations and visits for currenttrack.

See Also

locationsTracks.

Examples

1
#

henningte/herdersTA documentation built on Jan. 22, 2020, 5:16 a.m.