I have tried many ways to convert UTM to lon/lat, and getting always the same weird result.
Getting UTM and lon/lat for a point using GoogleEarth:
from pyproj import Proj
lon = -40.729124
lat = -20.967705
z = 24
l = 'k'
posx = 320235.13
posy = 7680455.66
myProj = Proj("+proj=utm +zone=24K, +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs")
clon, clat = myProj(posx, posy, inverse=True)
print(clon, clat)
I get…
-43.534213641680765 69.17434868536577
What do I missing?
Best Answer
try
"+proj=utm +zone=24 +south +datum=WGS84 +units=m +no_defs "
. use epsg.io to identify the appropriate proj4 input, look at the bottom of the page.another alternative is just use epsg code which is easier like this,
Proj('EPSG:32724')
alternatively using
geopandas