Skip to content

Fix stage_dem.py function apply_margin_to_geographic_box()#107

Open
gshiroma wants to merge 13 commits intoisce-framework:developfrom
gshiroma:fix_stage_dem_apply_margin_to_geographic_box
Open

Fix stage_dem.py function apply_margin_to_geographic_box()#107
gshiroma wants to merge 13 commits intoisce-framework:developfrom
gshiroma:fix_stage_dem_apply_margin_to_geographic_box

Conversation

@gshiroma
Copy link
Contributor

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 gshiroma added this to the R05.00.0 milestone Aug 21, 2025
@gshiroma gshiroma requested review from gmgunter and hfattahi August 21, 2025 22:09
@hfattahi hfattahi removed this from the R05.00.0 milestone Aug 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants