In latlon_to_zone_number you handle the zones 31V and 32V different from all the other zones.
Usually, you compute the zone number [left..right) and the zone letter [bottom..top). But for the corrections of 31V and 32V you use [left..right] and [bottom..top].
This leads to the following behavior:
for 52°N 12°E, 33U is returned. (which, in my opinion is correct)
for 60°N 12°E, 32V is returned. Shouldn't it be 33V?
for 64°N 5°E, 32W is returned. Shouldn't it be 31W?
I would replace line 179 by
if 56 <= latitude < 64 and 3 <= longitude < 12:
I didn't check your code for the corrections in the X-band in detail. (I'm not interrested in places this far north...) But I believe, we have the same issue there.
In
latlon_to_zone_number
you handle the zones 31V and 32V different from all the other zones.Usually, you compute the zone number
[left..right)
and the zone letter[bottom..top)
. But for the corrections of 31V and 32V you use[left..right]
and[bottom..top]
.This leads to the following behavior:
I would replace line 179 by
I didn't check your code for the corrections in the X-band in detail. (I'm not interrested in places this far north...) But I believe, we have the same issue there.