From another answer on this stackexchange I found the utm pypi package, which seems awesome. I seem to however get a wrong result for:

utm.to_latlon(246000, 9860000, 37, 'S')

It is possible though that I may just not understand it well enough (I just learned about utm and the geospatial data)

the output is:

(88.51038878697912, -189.68359627626393)

But I am expecting:

-1.265610402092456, 36.7174203637869

which I got from this website and is what I am expecting: http://rcn.montana.edu/Resources/Converter.aspx

What am I doing wrong?

1 Answer 1


A lot of times the UTM grid system is simplified to north (N) and south (S) hemispheres. But the grid zones on the latitude axis are actually most of the letters of the alphabet. See the wikipedia image here. The zone 37 S is actually in north Africa, in the northern hemisphere.

Your location is in grid zone 'M' so the utm call would be:

utm.to_latlon(246000, 9860000, 37, 'M')
(-1.265610382990383, 36.71742036367453)

You can also declare the hemisphere by using the northern argument which, admittedly, is not well documented.

utm.to_latlon(246000, 9860000, 37, northern=False)
(-1.265610382990383, 36.71742036367453)

  • 1
    thank you so much!!! I was going through this and I thought it can't be a bug since it's used here so wildly
    – Oliver
    Commented Oct 7, 2021 at 17:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.