将NAD83州平面坐标转换为WS84标准经纬度(以度为单位)

3

我尝试使用这个指南将一组NAD83州平面坐标系中的x-y坐标转换为经纬度坐标(以度为单位)。我可以复制此帖子中给出的示例,但无法正确处理我的数据集!以下是我尝试过和得到的结果[错误答案]。

library(rgdal)
nad83_coords <- data.frame(x=c(577430), y=c(2323270)) # My coordinates in NAD83
coordinates(nad83_coords) <- c('x', 'y')
proj4string(nad83_coords)=CRS("+init=esri:102272") # West Illinois
coordinates_deg <- spTransform(nad83_coords,CRS("+init=epsg:3436")) # West Illinois

> x             y
1 1894451.52045 7622263.00755

正确的解决方案必须是:

lat= 38.2525     deg
lon=-90.07364722 deg

我有一个用MATLAB编写的代码来完成这个任务,但我很想知道"rgdal"或R中的任何其他库是否可以完成这个任务。这样,我的世界将会更加美好!谢谢您的阅读。


%输入: % northing 美国尺的东西州平面参考点北向距离 % easting 美国尺的东西州平面参考点东向距离
% zone 是1983年的州平面坐标系统 %输出: % 纬度(latitude)为正北 % 经度(longitude)为正西 % 纬度和经度以度为单位(内部计算以弧度为单位)
- Rotail
EPSG 3436也是NAD83投影。当我使用 EPSG 4326(WGS84)时,得到的结果是-96.57821 x 42.86485。这些值与正确的解决方案有所偏差,但我很想知道这些值来自何处。 - Badger
当我只在spTransform中尝试EPSG:3426时,我得到的结果是:577430,2323270。而当我在spTransform和proj4string中都尝试EPSG:3426时,我分别得到了x和y坐标为577430和2323270。这些结果甚至看起来都不正确! - Rotail
这看起来有些奇怪,你在非洲某个地方使用EPSG 4326并得到了合理的答案。我仍在努力复现你的结果。 - Rotail
1
3426也是NAD 83,如果您想要经纬度坐标,您需要使用WGS84投影。您可以使用您提供的ESRI:proj代码和EPSG: 4326。该引脚位于0,0(靠近非洲西海岸),这是因为WGS84是全球投影,它不特定于任何单个区域。 - Badger
你能分享一下你执行的确切代码行,以获得-96.57821 x 42.86485吗? - Rotail
1个回答

2
为了获得经度和纬度坐标,您需要从投影坐标系(NAD 83)转换到地理坐标系(WGS 84)。在您的数据中,您正在使用以英尺为单位的投影,因此您的伊利诺伊西部投影是正确的。但是,在原始帖子中,并且下面突出显示的错误是将 spTransform 从 NAD83 转换到 NAD83,导致出现错误的数据。有关投影和地理坐标系之间差异的更多信息可以在此处找到: 这里。相反,您需要在转换中使用 WGS84 投影,如下所示:**正如Jim指出的,现在已经包含了从英尺到米的转换。
library(rgdal)
   nad83_coords <- data.frame(x=c(577430), y=c(2323270)) # My coordinates in NAD83
nad83_coords <- nad83_coords *.3048 ## Feet to meters
    coordinates(nad83_coords) <- c('x', 'y')
    proj4string(nad83_coords)=CRS("+init=esri:102272") # West Illinois
    ## Erroneous code, NAD83 to NAD83
    ## coordinates_deg <- spTransform(nad83_coords,CRS("+init=epsg:3436"))
    ## Corrected with WGS84 to yield Lat/Long
    coordinates_deg <- spTransform(nad83_coords,CRS("+init=epsg:4326"))
    coordinates_deg
    SpatialPoints:
                x        y
    [1,] -96.57822 42.86484
    Coordinate Reference System (CRS) arguments: +init=epsg:4326 +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0 

如果您不想转换,我们可以使用以下投影EPSG: 3531

library(rgdal)
   nad83_coords <- data.frame(x=c(577430), y=c(2323270)) # My coordinates in NAD83
    coordinates(nad83_coords) <- c('x', 'y')
    proj4string(nad83_coords)=CRS("+init=EPSG:3531") # West Illinois
    ## Erroneous code, NAD83 to NAD83
    ## coordinates_deg <- spTransform(nad83_coords,CRS("+init=epsg:3436"))
    ## Corrected with WGS84 to yield Lat/Long
    coordinates_deg <- spTransform(nad83_coords,CRS("+init=epsg:4326"))
    coordinates_deg
    SpatialPoints:
                x        y
    [1,] -96.57821 42.86485
    Coordinate Reference System (CRS) arguments: +init=epsg:4326 +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0 

我明白你在说坐标应该放在哪里,查看空间参考网站,你的坐标在该投影窗口内,但它们没有按预期输出。仍在继续探究。


耶,萨斯喀彻温省,我认为你的坐标可能有问题?或者是你的投影方式?我会在明天有空的时候看一下。很好的发现,抱歉我没注意到。 - Badger
2
OP提供的坐标是正确的,只是它们使用的单位是英尺,而esri:102272使用米作为单位。OP需要相应地转换他们的坐标,这样应该可以得到大约经度为-96.57725,纬度为42.86908的位置。 - user666993
-96.5782191447 X 42.8648393807 在南达科他州某处,我猜测可能是伊利诺伊州西部的某个地方。不过我们离目标越来越近了!;) - Rotail
Wgs84和nad83是两个不同的坐标系统。所以我不太确定你在说什么。 - Badger
我想要的是将NAD 83州平面坐标转换为WS84。举个例子,我希望(577430, 2323270)被转换为(38.2525, -90.0736)。 - Rotail
显示剩余2条评论

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接