将ESRI投影坐标转换​​为lat-lng

时间:2022-05-05 00:54:08

I have a large dataset of x,y coordinates in "NAD 1983 StatePlane Michigan South FIPS 2113 Feet" (aka ESRI 102690). I'd like to convert them to lat-lng points.

我在“NAD 1983 StatePlane Michigan South FIPS 2113 Feet”(又名ESRI 102690)中有一个大的x,y坐标数据集。我想把它们转换成lat-lng点。

In theory, this is something proj is built to handle, but the documentation hasn't given me a clue -- it seems to describe much more complicated cases.

从理论上讲,这是proj可以处理的东西,但文档并没有给我一个线索 - 它似乎描述了更复杂的案例。

I've tried using a python interface, like so:

我尝试过使用python接口,如下所示:

from pyproj import Proj
p = Proj(init='esri:102690')
sx = 13304147.06410000000 #sample points
sy = 288651.94040000000
x2, y2 = p(sx, sy, inverse=True)

But that gives wildly incorrect output.

但这会产生非常不正确的输出。

There's a Javascript library, but I have ~50,000 points to handle, so that doesn't seem appropriate.

有一个Javascript库,但我有大约50,000点处理,所以这似乎不合适。


What worked for me:

什么对我有用:

I created a file called ptest with each pair on its own line, x and y coordinates separated by a space, like so:

我创建了一个名为ptest的文件,每对都在自己的行上,x和y坐标用空格分隔,如下所示:

13304147.06410000000 288651.94040000000
...

Then I fed that file into the command and piped the results to an output file:

然后我将该文件输入命令并将结果传送到输出文件:

$>cs2cs -f %.16f +proj=lcc +lat_1=42.1 +lat_2=43.66666666666666 
+lat_0=41.5 +lon_0=-84.36666666666666 +x_0=4000000 +y_0=0 +ellps=GRS80 
+datum=NAD83 +to_meter=0.3048006096012192 +no_defs +zone=20N +to 
+proj=latlon ptest > out.txt

2 个解决方案

#1


If you only need to reproject and can do some data-mining on your text files use whatever you like and use http://spatialreference.org/ref/esri/102690/ as reference.

如果您只需要重新投影并可以对文本文件进行一些数据挖掘,请使用您喜欢的任何内容,并使用http://spatialreference.org/ref/esri/102690/作为参考。

For example use the Proj4 and store it in a shell/cmd file and call out your input file with proj4 (linux/windows version available) no problem with the size your dataset.

例如,使用Proj4并将其存储在shell / cmd文件中,并使用proj4调用输入文件(linux / windows version available),数据集大小没问题。

cs2cs +proj=latlong +datum=NAD83 +to +proj=utm +zone=10  +datum=NAD27 -r <<EOF
cs2cs -f %.16f +proj=utm +zone=20N +to +proj=latlon - | awk '{print $1 " " $2}

so in your case something like this:

所以在你的情况下这样的事情:

cs2cs -f %.16f +proj=lcc +lat_1=42.1 +lat_2=43.66666666666666 +lat_0=41.5 +lon_0=-84.36666666666666 +x_0=4000000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs +zone=20N +to +proj=latlon

http://trac.osgeo.org/proj/wiki/man_cs2cs

http://trac.osgeo.org/proj/

#2


If you have coordinates in TXT, CSV or XLS file, you can do CTRL+C and insert them to http://cs2cs.mygeodata.eu where you can set appropriate input and desired output coordinate system. It is possible to insert thousands of coordinates in various formats...

如果您有TXT,CSV或XLS文件中的坐标,您可以执行CTRL + C并将它们插入http://cs2cs.mygeodata.eu,您可以在其中设置适当的输入和所需的输出坐标系。可以以各种格式插入数千个坐标......

#1


If you only need to reproject and can do some data-mining on your text files use whatever you like and use http://spatialreference.org/ref/esri/102690/ as reference.

如果您只需要重新投影并可以对文本文件进行一些数据挖掘,请使用您喜欢的任何内容,并使用http://spatialreference.org/ref/esri/102690/作为参考。

For example use the Proj4 and store it in a shell/cmd file and call out your input file with proj4 (linux/windows version available) no problem with the size your dataset.

例如,使用Proj4并将其存储在shell / cmd文件中,并使用proj4调用输入文件(linux / windows version available),数据集大小没问题。

cs2cs +proj=latlong +datum=NAD83 +to +proj=utm +zone=10  +datum=NAD27 -r <<EOF
cs2cs -f %.16f +proj=utm +zone=20N +to +proj=latlon - | awk '{print $1 " " $2}

so in your case something like this:

所以在你的情况下这样的事情:

cs2cs -f %.16f +proj=lcc +lat_1=42.1 +lat_2=43.66666666666666 +lat_0=41.5 +lon_0=-84.36666666666666 +x_0=4000000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs +zone=20N +to +proj=latlon

http://trac.osgeo.org/proj/wiki/man_cs2cs

http://trac.osgeo.org/proj/

#2


If you have coordinates in TXT, CSV or XLS file, you can do CTRL+C and insert them to http://cs2cs.mygeodata.eu where you can set appropriate input and desired output coordinate system. It is possible to insert thousands of coordinates in various formats...

如果您有TXT,CSV或XLS文件中的坐标,您可以执行CTRL + C并将它们插入http://cs2cs.mygeodata.eu,您可以在其中设置适当的输入和所需的输出坐标系。可以以各种格式插入数千个坐标......