Learn R Programming

trackdf (version 0.3.3)

projection: Access/Modify the Projection of a Track Table

Description

Functions to access or modify the projection of a data table. Changing the projection will trigger automatically the conversion of the locations in the new coordinate system.

Usage

projection(x)

projection(x) <- value

project(x, value)

Value

A track table.

Arguments

x

A track table.

value

A character string or a terra::crs object representing the projection of the coordinates. "+proj=longlat" is suitable for the outputs of most GPS trackers.

Author

Simon Garnier, garnier@njit.edu

See Also

Examples

Run this code
data(short_tracks)

projection(short_tracks)
tracks_projected <- project(short_tracks, "+proj=somerc")
projection(tracks_projected)
projection(tracks_projected) <- "+proj=longlat"
projection(tracks_projected)

Run the code above in your browser using DataLab