locationsTracks: Identifies and classifies visits in GPS tracks.

Description Usage Arguments Details Value See Also Examples

View source: R/locationsTracks.R

Description

locationsTracks identifies clusters (locations) of points in GPS tracks (for all Track objects (currenttrack) in a Tracks object) using locationsTrack.

Usage

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

Arguments

currenttracks

A Tracks 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.

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 and 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.

night

An integer vector with two elements:

  1. The first element specifies the start hour of the night, e.g. 0 for 0 o'clock.

  2. The first element specifies the start hour of the night, e.g. 4 for 4 o'clock.

cores

An integer value representing the number of cores to use in parallel computing.

clcall

A function that is passed to clusterCall.

Details

The function can be used in order to assign to each data value of the Track objects of the input Tracks 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 Tracks object with Track objects that are identical to the input Track objects, but have four additional columns in their data slot:

location

An integer value for each identified spatial point cluster (location) increasing with the time starting from 1.

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).

visitsloc

An integer vector indicating the number of visits at a specific location the data point is assigned to (i.e. a counter for the visits at a specific location).

visitscampsite

An integer vector indicating the number of visits at a specific location the data point is assigned to that are classified as long-term visits (campsites) (i.e. a counter for the long-term visits at a specific location).

Gaps, as indicated by the column gap, have NA values for all four variables.

If (summary = TRUE)

A list of data.frame objects summarising the locations and visits of the input Track objects with the following variables:

location

An integer value for each identified spatial point cluster (location) increasing with the time starting from 1.

lon

The longitude of the respective location (as mean value of the coordinates of the data values assigned to the visit).

lat

The latitude of the respective location (as mean value of the coordinates of the data values assigned to the visit).

alt

The altitude of the respective location (as mean value of the coordinates of the data values assigned to the visit).

visitsloc

An integer vector indicating the number of visits at a specific location the data point is assigned to (i.e. a counter for the visits at a specific location).

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).

visitscampsite

An integer vector indicating the number of visits at a specific location the data point is assigned to that are classified as long-term visits (campsites) (i.e. a counter for the long-term visits at a specific location).

arrivaltime

A POSIXct vector indicating the arrival time of the visit at the respective location.

departuretime

A POSIXct vector indicating the departure time of the visit from the respective location.

residencetime

A numerical vector indicating the residence time of each visit [s].

speed

The speed of the respective location (as mean value of the speed values of the data values assigned to the visit).

See Also

locationsTrack.

Examples

1
#

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