将NAD83状态平面坐标转换为以度为单位的WS84标准经度/纬度 [英] Converting NAD83 state plane coordinates to WS84 standard lon/lat in degrees

查看:782
本文介绍了将NAD83状态平面坐标转换为以度为单位的WS84标准经度/纬度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用此指令,可将NAD83状态平面坐标中的一组xy坐标转换为以度为单位的常规Lan/Lat坐标.我可以重现本文中给出的示例,但无法为我的设置提供正确的答案!以下是我尝试过的以及得到的[错误答案].

I tried to use this instruction to convert a set of x-y coordinates in NAD83 State Plane Coordinates to regular Lan/Lat coordinates in degrees. I could reproduce for the example given in this post but it fails to give right answer to my set! Following is what I have tried and what I obtained [wrong answer].

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

正确的解决方案必须是:

The correct solution must be:

lat= 38.2525     deg
lon=-90.07364722 deg

我有一个代码可以在MATLAB中完成这项工作,但是我真的很想知道Rgdal或R中的任何其他库是否可以做到这一点.这样,我的世界会更加美丽!谢谢您的阅读.

I have a code to do this job in MATLAB, but I am really interested to know if "rgdal" or any other library in R can do this. This way, my world would be more beautiful! Thank you for reading.

推荐答案

要获得纬度和经度坐标,您需要从投影坐标系(NAD 83)转到地理坐标系(WGS 84).对于数据,您使用的是以英尺为单位的投影,因此您的西伊利诺伊州投影是正确的.但是,您在原始帖子中并在下面突出显示的错误是,您从NAD83到NAD83的spTransform为您提供了错误的数据.有关投影坐标系和地理坐标系之间差异的更多信息,请参见此处.取而代之的是,您需要在转换中使用WGS84投影,如下所示:**正如Jim所指出的,现在已合并了从英尺到米的转换.

In order to achieve Latitude and Longitude coordinates you need to go from you projected coordinate system (NAD 83) to a geographic coordinate system (WGS 84). In the case of your data you are using a projection in feet, so your West Illinois projection is correct. However, your mistake in the orignal post and highlighted below was that you spTransform from NAD83 to NAD83 giving you erroneous data. More information on the difference between projected and geographic coordinate systems can be found here. Instead you need to use a WGS84 projection in your transformation, as follows: ** as noted by Jim, the conversion from feet to meters is now incorporated.

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

In the event you did not want to convert we can use the following projection 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 

我看到您在说什么关于坐标应该在哪里,看着空间参考位置,您的坐标在该投影的窗口内,但是它们并没有像预期的那样输出.还在挖掘.

I see what you're saying about where the coordinates should be, looking at the spatial reference site, your coordinates are within the window of that projection, but they aren't coming out as expected. Still digging.

这篇关于将NAD83状态平面坐标转换为以度为单位的WS84标准经度/纬度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆