We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent df439a5 commit d3aea1eCopy full SHA for d3aea1e
climada/util/coordinates.py
@@ -527,6 +527,11 @@ def convert_wgs_to_utm(lon, lat):
527
epsg_code : int
528
EPSG code of UTM projection.
529
"""
530
+ if not check_if_geo_coords(lat, lon):
531
+ raise ValueError(
532
+ "Input lat and lon coordinates are not geographic "
533
+ "or have total extents > 180° for lat or > 360° for lon."
534
+ )
535
epsg_utm_base = 32601 + (0 if lat >= 0 else 100)
536
return epsg_utm_base + (math.floor((lon + 180) / 6) % 60)
537
0 commit comments