Repository navigation
Conversation
…ngitude Represent "full 360" longitude spans as [-180,180] (which is only valid, normalized representation of that case) refs #Open-EO/openeo-geopyspark-driver#1974, #564
There was a problem hiding this comment.
🟡 Changes recommended
The user-visible full-globe bounding-box change lacks the required changelog entry describing the full-360° normalization fix and its handling of floating-point imprecision.
1 open issue
What changed in this PR
This PR improves longitude normalization for full-globe bounding boxes, addressing shifted global raster extents such as AGERA5.
Changes:
- Normalize spans of 360° or positive multiples to
[-180, 180]. - Allow small floating-point discrepancies when detecting full-globe spans.
- Add regression tests for shifted extents, normalization boundaries, and geometry conversion.
| File | Description |
|---|---|
| tests/util/test_geometry.py | Adds full-globe normalization and bounding-box regression tests. |
| openeo_driver/util/geometry.py | Detects full-globe longitude spans and documents their canonical representation. |
Review effort: Balanced
| @@ -430,9 +430,20 @@ class CrsRequired(BoundingBoxException): | |||
| def normalize_west_east_longitude(west: float, east: float) -> Tuple[float, float]: | |||
There was a problem hiding this comment.
This method is also defined in openeo-python-client. @dsamaey Should we delete it from python driver, and work further in python client?
There was a problem hiding this comment.
I was aware that normalize_west_east_longitude is in openeo-python-client too, but I would avoid over-coupling here. I'm even considering to make normalize_west_east_longitude private in python driver, as it becoming quite specific to the bounding box handling with this PR
…e_west_east_longitude

Represent "full 360" longitude spans as [-180,180] (which is only valid, normalized representation of that case)
for #Open-EO/openeo-geopyspark-driver#1974 alternative to #564