sp_transform | R Documentation |
For transformations involving NAD27 coordinates ("+datum=NAD27"), custom parameters for Alaska (excluding Aleutian islands) are automatically applied ("+towgs84=-5,135,172"). See http://web.archive.org/web/20130905025856/http://surveying.wb.psu.edu/sur351/DatumTrans/datum_transformations.htm.
sp_transform(xy, from, to, cols = 1:2)
xy |
Data.frame or numeric vector (coerced to single-row data.frame). |
from |
Current proj.4 string. |
to |
Target proj.4 string. |
cols |
Column numbers or names specifying which |
Object of the same class and dimensions as xy
with coordinates transformed in place.
xy <- c(-147.25079, 61.18586, 505)
sp_transform(xy, "+proj=longlat +datum=WGS84", "+proj=utm +zone=6")
xy <- c(x = -147.25079, y = 61.18586, z = 505)
sp_transform(xy, "+proj=longlat +datum=WGS84", "+proj=utm +zone=6")
xy <- data.frame(z = 505, x = -147.25079, y = 61.18586)
sp_transform(xy, "+proj=longlat +datum=WGS84", "+proj=utm +zone=6", cols = c("x", "y"))
xy <- data.frame(x = c(NA, -147.25079), y = c(NA, 61.18586), z = 505)
sp_transform(xy, "+proj=longlat +datum=WGS84", "+proj=utm +zone=6")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.