【发布时间】:2020-12-02 14:42:41
【问题描述】:
我有一个海岸线空间值的 df,但它们是纬度/经度,我需要它们位于 NAD83 / UTM 区域 10N。我可以通过在 dplyr 管道中进行变异来做到这一点吗?
testdf <- data.frame(long = c(-124.0048, -123.9844, -123.9691, -123.9604, -123.9810, -123.9612),
lat = c(45.04352, 45.10493, 45.20530, 45.29999, 45.34960, 45.40917))
testdf %>% mutate(utm = rgdal::project(c(lon,lat), proj = ???),
# but then I guess I would need to separate the utm column into x and y still.
或者可能是map()?
编辑:对不起,我现在意识到这是一个不好的代表。实际数据集有投影+proj=longlat +datum=WGS84 +no_defs。现在正在将其编辑到testdf。
【问题讨论】:
标签: r dplyr coordinates spatial utm