View source: R/transform_coord.R
transform_coord | R Documentation |
The function transforms spatial coordinates from original projection (decimal degrees assumed) to another projection.
transform_coord(
x = NULL,
lon = NULL,
lat = NULL,
new.names = c("lon.utm", "lat.utm"),
proj.og = "+proj=longlat +datum=WGS84",
proj.out = "+init=epsg:32633",
map.type = NULL,
verbose = FALSE,
bind = FALSE,
na = "ignore"
)
x |
data frame to be transformed. Can be omitted if numeric vectors are assigned to |
lon , lat |
either a name of the longitude and latitude columns in |
new.names |
a vector of length 2 specifying the names of transformed longitude and latitude columns, respectively. |
proj.og |
original |
proj.out |
the |
map.type |
a character string specifying the map type for which coordinates should be transformed to. If |
verbose |
if |
bind |
logical. Should only transformed coordinates be returned ( |
na |
character specifying the NA action for missing coordinates. The "ignore" option ignores the coordinates and returns NAs to transformed coordinates. The "remove" option removes missing values from |
If x
is specified, the function guesses longitude and latitude columns from x
by default.
Returns a data frame with transformed spatial coordinates
Mikko Vihtakari
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.