Gauss-Krüger 坐标到 R 中的 WGS84

Gauss-Krüger coordinates to WGS84 in R

我需要将 Gauss-Krüger 坐标转换为 WGS84 坐标(系统使用 Google)。我正在使用 R 来做到这一点,但我没有找到解决此问题的简单示例。

你能帮帮我吗?

我用于测试转换的数据:

地址:Hauptstraße 62 70736 德国费尔巴赫

输入(高斯-克吕格):3519358.50 5411371.00

输出 (WGS84):48.839580、9.262591

谢谢!!!

我无法对此发表评论,所以我不得不 post 在这里作为答案。但是在我得到解决方案之前,输出坐标是否应该反转?

解决方案:(改编自here

library(rgdal)
# Creating data
GK <- data.frame(cbind("X_GK"=3519358.50,"Y_GK"=5411371.00))

#Spatial Information, Coordinates Transform
coordinates(GK) <- c("X_GK", "Y_GK")
proj4string(GK) <- CRS("+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs") # Defining Gauss Krüger
GK.WGS84 <- spTransform(GK, CRS("+proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0")) # tranforming to WGS84 longlat

GK.WGS84

输出:

> GK.WGS84
SpatialPoints:
         X_GK     Y_GK
[1,] 9.262686 48.83949
Coordinate Reference System (CRS) arguments: +proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0