projection: Access/Modify the Projection of a Track Table

View source: R/utils.R

projectionR Documentation

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)

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.

Value

A track table.

Note

It is not possible to modify the projection if missing coordinates are present.

Author(s)

Simon Garnier, garnier@njit.edu

See Also

st_crs

Examples

data(short_tracks)

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


trackdf documentation built on March 31, 2023, 5:47 p.m.