Turbo87 / utm

Bidirectional UTM-WGS84 converter for python
http://pypi.python.org/pypi/utm
MIT License
493 stars 101 forks source link

Returning wrong zone? #63

Open e5k opened 3 years ago

e5k commented 3 years ago

Hi,

I am trying to get the UTM zone for given coordinates (i.e. Taal volcano) using v0.7, Python 3.9 on Anaconda/OSX. It should return 51 P but returns 50 L. Any idea? Cheers

S

lat=14.0107554
lon=120.9979889

zone = utm.from_latlon(lat,lon)

zone
(609326.0410868623, 9088147.638740664, 50, 'L')
image
eumiro commented 3 years ago

Just to compare with Python 3.9.0 and the current git clone:

>>> import utm
>>> lat=14.0107554
>>> lon=120.9979889
>>> utm.from_latlon(lat,lon)
(283772.21524068655, 1549830.6652980775, 51, 'P')
e5k commented 3 years ago

Ok my bad, I had the pip version, thanks for trying. Maybe worth updating it there?