View source: R/spatial_convert.R
spatial_convert | R Documentation |
Coordinates are converted between reference systems.
spatial_convert(data, from, to)
data |
|
from |
|
to |
|
Numeric
data frame with converted coordinates.
Michael Dietze
## create lat lon coordinates
xy <- c(13, 55)
## define output coordinate systems
proj_in <- "+proj=longlat +datum=WGS84"
proj_out <- "+proj=utm +zone=32 +datum=WGS84"
## convert coordinate pair
spatial_convert(data = xy,
from = proj_in,
to = proj_out)
## define set of coordinates
xy <- data.frame(x = c(10, 11),
y = c(54, 55))
## convert set of coordinates
spatial_convert(data = xy,
from = proj_in,
to = proj_out)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.