The error OutOfRangeError: latitude out of range (must be between 80 deg S and 84 deg N)"
appears when I use the utm.from latlon()
function on a dataframe.
When I try it for a single lat/long, however, it returns the result. I'm not sure what's going on.
e.g. dataframe
Lat Lon
0 49.183630 -121.936812
1 43.901052 -78.939154
2 43.887452 -78.871573
3 42.882137 -82.445210
4 43.372565 -79.762019
My Lat/Long is not reversed, as I checked.
Let's say utm function is defined as:
def f(x,y):
return utm.from_latlon(x,y)
And I am calling the function as:
dataframe.apply(lambda row: f(row['Lat'], row['Lon']), axis=1)