Description Usage Arguments Value Examples
View source: R/convertformats.R
Converts a single coordinate pair to a different coordinate system
1 | xyTransform(coords, proj1, proj2)
|
coords |
A vector of length 2 with the coordinates |
proj1 |
The CRS of the input coordinates |
proj2 |
The target CRS of the output coordinates |
A vector of length 2 with the converted coordinate pair.
1 2 3 | bng <- CRS("+init=epsg:27700") # British National Grid
lonlat <- CRS("+init=epsg:4326") # LatLon WGS84
xyTransform(c(345600,378200), bng, lonlat)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.