Skip to content

Commit ca46f05

Browse files
committed
ensure only 4326 checked for AM crossing
1 parent c33eb92 commit ca46f05

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

dem_handler/dem/rema.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,14 @@ def get_rema_dem_for_bounds(
144144
dem_crosses_antimeridian = False
145145
# run a basic to check if the bounds likely cross the antimeridian but
146146
# are just formatted wrong. If so, warn the user.
147-
if check_bounds_likely_cross_antimeridian(bounds):
148-
logging.warning(
149-
"Provided bounds have very large longitude extent. If the shape crosses the "
150-
f"antimeridian, reformat the bounds as : ({bounds[2]}, {bounds[1]}, {bounds[0]}, {bounds[3]}). "
151-
"For large areas, provide the inputs bounds in 3031 to avoid transform errors between "
152-
"coordinate systems."
153-
)
147+
if bounds_src_crs == 4326:
148+
if check_bounds_likely_cross_antimeridian(bounds):
149+
logging.warning(
150+
"Provided bounds have very large longitude extent. If the shape crosses the "
151+
f"antimeridian, reformat the bounds as : ({bounds[2]}, {bounds[1]}, {bounds[0]}, {bounds[3]}). "
152+
"For large areas, provide the inputs bounds in 3031 to avoid transform errors between "
153+
"coordinate systems."
154+
)
154155

155156
if bounds_src_crs != REMA_CRS:
156157
logging.warning(

0 commit comments

Comments
 (0)