我需要从Gaussüger坐标转换为WGS84坐标(系统由谷歌使用)。我正在使用R来完成这个任务,但是我找不到一个简单的例子来解决这个问题。
你能帮帮我吗?
我用于测试转换的数据:
地址:Hauptstra e 62 70736 Fellbach,德国
输入(Gaussüger):3519358.50 5411371.00
输出(WGS84):48.839580,9.262591
谢谢!
发布于 2015-07-21 14:50:36
我不能对此发表评论,所以我不得不把它作为答复在这里发表。但是在我开始解之前,输出坐标是否应该反转呢?
解决方案:(改编自这里)
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 https://stackoverflow.com/questions/31542044
复制相似问题