I'm trying to convert Projected bounds to WGS84 using Pyproj but getting strange results.
The Projected Bounds are : 909126.0155, 110626.2880, 1610215.3590, 424498.0529
The corresponding WGS84 Bounds (the target) are: -74.2700, 40.4700, -71.7500, 41.3100
The data is from: http://spatialreference.org/ref/epsg/nad83-new-york-long-island-ftus/
>>> from pyproj import Proj, transform
>>> inProj = Proj("+init=EPSG:2236")
>>> outProj = Proj("+init=EPSG:3857")
>>> x1,y1 = (110626.2880, 909126.0155)
>>> print(transform(inProj,outProj,x1,y1))
(-9122788.926222347, 3833518.013375292)
The outProj is based on my understanding of what Google Maps uses.
Best Answer
Look Converting EPSG:2284 to EPSG:4326 with pyproj (and many others...).
Pyproj expects degrees (lon, lat) or meters (x,y) as units but the unit of Projection: 2263 is
UNIT["US survey foot"...
, therefore you need to usepreserve_units=True
.Control with GDAL/OSR
New : Now how do I reverse the result?
Now reverse the result:
And you get the original values if you use print(y,x)