project_data {CCAMLRGIS} | R Documentation |
Project user-supplied locations
Description
Given an input dataframe containing locations given in decimal degrees or meters (if projected),
projects these locations and, if desired, appends them to the input dataframe.
May also be used to back-project to Latitudes/Longitudes provided the input was projected
using a Lambert azimuthal equal-area projection (CCAMLRp
).
Usage
project_data(
Input,
NamesIn = NULL,
NamesOut = NULL,
append = TRUE,
inv = FALSE
)
Arguments
Input |
dataframe containing - at the minimum - Latitudes and Longitudes to be projected (or Y and X to be back-projected). |
NamesIn |
character vector of length 2 specifying the column names of Latitude and Longitude fields in
the
|
NamesOut |
character vector of length 2, optional. Names of the resulting columns in the output dataframe,
with order matching that of |
append |
logical (T/F). Should the projected locations be appended to the |
inv |
logical (T/F). Should a back-projection be performed? In such case, locations must be given in meters
and have been projected using a Lambert azimuthal equal-area projection ( |
See Also
Examples
#Generate a dataframe
MyData=data.frame(Lat=runif(100,min=-65,max=-50),
Lon=runif(100,min=20,max=40))
#Project data using a Lambert azimuthal equal-area projection
MyData=project_data(Input=MyData,NamesIn=c("Lat","Lon"))
#View(MyData)