Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use antimeridian package for creating bbox #150

Merged
merged 3 commits into from
Dec 13, 2023
Merged

Conversation

philvarner
Copy link
Collaborator

@philvarner philvarner commented Dec 13, 2023

Related issues

Description

For antimeridian-crossing scenes, the bbox calculation from shapely was incorrect, such that the bbox was both too large (e.g., spanning almost the entire globe), and didn't quite actually cover the scene (e.g., missing a bit of longitude along the AM). This fixes that, and rounds the values to the standard 6 decimal places.

For example, a bbox like

"bbox": [
    -179.72957,
    -17.25485,
    180.0,
    -16.247763
  ],

is obviously wrong, because it spans nearly the entire longitude, from -179.7 to 180, but misses -180 to -179.7 -- so it both covers too much area (e.g, about 356 degrees too much!) and misses the 0.3 degrees to the east of the antimeridian. This bbox should have a SW lon coordinate that's like 178 and a NE lon coordinate that's like -178, which indicates that it actually does cross the AM, rather than spanning the entire globe.

Checklist

  • Includes tests
  • Includes documentation
  • Updates CHANGELOG

@philvarner philvarner merged commit 3bf4923 into main Dec 13, 2023
4 checks passed
@philvarner philvarner deleted the pv/use-am-for-bbox branch December 13, 2023 16:19
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.

bbox for antimeridian-crossing scenes is incorrect
3 participants