【问题标题】:Transforming coordinates using R - SWEREF to WGS84使用 R - SWEREF 将坐标转换为 WGS84
【发布时间】:2019-08-30 16:03:42
【问题描述】:

我在 SWEREF 99 TM 中有一些协调,我无法使用 R 中的 proj4 包将其转换为 WGS84。

temp <-  data.frame (x = c(598223, 598812, 598824, 598232, 597614, 597629), 
        y = c(7095460, 7095426, 7094827, 7094227, 7094821, 7095433))


ptransform(temp, 
    src.proj = '+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ',
    dst.proj = '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs', silent=TRUE)

请注意,输出不等同于瑞典的坐标 - 纬度等同于赤道附近的纬度。

【问题讨论】:

标签: r wgs84 proj


【解决方案1】:

我设法使用SpatialPointsspTransformrgdal 转换坐标:

temp <- data.frame (x = c(598223, 598812, 598824, 598232, 597614, 597629), y = c(7095460, 7095426, 7094827, 7094227, 7094821, 7095433))

temp &lt;- SpatialPoints (temp, proj4string = CRS ('+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs'))

temp &lt;- as.data.frame (spTransform(temp, CRS('+proj=longlat +datum=WGS84 +no_defs')))

【讨论】:

    猜你喜欢
    • 2016-05-25
    • 1970-01-01
    • 2017-03-08
    • 2021-06-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-12-18
    相关资源
    最近更新 更多