I have latitudes and longitudes from a GPS unit which uses WGS84
, and would like to project those to some kind of plane.
I'm totally new to this, but after a lot of reading it sounds like UTM is a good projection to use. According to the Wiki page on UTM, I'm in zone 34H
(a very nice place to live, by the way).
I found two python
modules to help me do this:
(1) Using pyproj
, which wraps Proj4:
from pyproj import Proj
p = Proj(proj='utm', ellps='WGS84', zone='34H')
lat, lon = -34.228258, 18.413602
p(lon, lat)
Which results in:
(261762.5589262726, -3790491.0744062006)
(2) Using utm
:
import utm
lat, lon = -34.228258, 18.413602
utm.from_latlon(lat, lon)
Which results in:
(261762.55890839838, 6209508.925565818, 34, 'H')
As you can see, the y values differ, but the x values are the same for all practical purposes. It looks like the y values are shifted by about 9999999.999972
, but not scaled. So it seems that these modules are using different origins for the xy plane.
- Which one is right?
- How can I change it using either module?
zone=34