Skip to content
Advertisement

degree decimal to utm conversion, python

I got surprised when I tried to convert degree decimal coordinates into utm by using available library in anacondautm.

my coordinates looks like:

JavaScript

and lat values are:

JavaScript

when I made scatter plot it looks like normal:

enter image description here

After converting coordinates in to utm distribution of the points change completely and looks strange like in this figure:

enter image description here

the code that i used to conver is:

JavaScript

as suggested in comments: I switch lon lat positn i.e, plt.scatter (Y,X) it gives:

enter image description here

Am I doing something wrong, or is this result correct?

Advertisement

Answer

The answer might be helpful for others so I have posted my solution. I found pyproj works better then utm. In pyproj we can specify utm zone.

import pyproj

from pyproj import Proj

JavaScript

and the figure looks good!

enter image description here

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement