use antimeridian package for creating bbox #150
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
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