isce3 icon indicating copy to clipboard operation
isce3 copied to clipboard

Fix `stage_dem.py` function `apply_margin_to_geographic_box()`

Open gshiroma opened this issue 5 months ago • 0 comments

This PR fixes stage_dem.py function apply_margin_to_geographic_box():

  • The latitude "worst case" is currently computed with maximum latitude lat_worst_case = max([lat_min, lat_max]). Instead, we should use the absolute latitude value to account for the negative latitudes: abs_lat_worst_case = max([abs(lat_min), abs(lat_max)]).
  • In the case that the polygon crosses the antimeridan and the minimum and maximum longitudes are swapped, we add 360 to "unwrap" the minimum longitude so it becomes the new maximum longitude.

gshiroma avatar Aug 21 '25 22:08 gshiroma