Pergunta

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.

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.

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

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.


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:

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
Foi útil?

Solução

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.

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.

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/

Outras dicas

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...

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top