diff --git a/CHANGES.md b/CHANGES.md index 5ca4a6e8..4c3b2db6 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,7 @@ ## 0.21.2 (2024-mm-dd) +- FIX: In `SPOT` products, METADATA.DIM and IMAGERY.TIF must be at the root of the product ([#145](https://github.com/sertit/eoreader/issues/145)) - FIX: `Sentinel-2` product with StopIteration error ([#142](https://github.com/sertit/eoreader/issues/142)) - FIX: Fix `Maxar` product with `QB02` satellite ID ([#140](https://github.com/sertit/eoreader/issues/140)) - ENH: `to_str` and `to_band`: add a `as_list` argument defaulting to `True`. When set as False, return a str from `to_str` and a band from `to_band` ([#138](https://github.com/sertit/eoreader/issues/138)). Thanks @jsetty! diff --git a/eoreader/reader.py b/eoreader/reader.py index ef3ed91d..d4d474ad 100644 --- a/eoreader/reader.py +++ b/eoreader/reader.py @@ -360,27 +360,18 @@ class Constellation(ListEnum): Constellation.SV1: r"SV1-0[1-4]_\d{8}_L(1B|2A)\d{10}_\d{13}_\d{2}-(MUX|PSH)\.xml", Constellation.HLS: rf"{CONSTELLATION_REGEX[Constellation.HLS]}\.Fmask\.tif", Constellation.GS2: rf"{CONSTELLATION_REGEX[Constellation.GS2]}\.dim", - Constellation.SPOT45: { - "nested": -1, # File that can be found at any level (product/**/file) - "regex": [ - r"METADATA\.DIM", # Too generic name, check also a band - r"IMAGERY\.TIF", - ], - }, - Constellation.SPOT4: { - "nested": -1, # File that can be found at any level (product/**/file) - "regex": [ - r"METADATA\.DIM", # Too generic name, check also a band - r"IMAGERY\.TIF", - ], - }, - Constellation.SPOT5: { - "nested": -1, # File that can be found at any level (product/**/file) - "regex": [ - r"METADATA\.DIM", # Too generic name, check also a band - r"IMAGERY\.TIF", - ], - }, + Constellation.SPOT45: [ + r"METADATA\.DIM", # Too generic name, check also a band + r"IMAGERY\.TIF", + ], + Constellation.SPOT4: [ + r"METADATA\.DIM", # Too generic name, check also a band + r"IMAGERY\.TIF", + ], + Constellation.SPOT5: [ + r"METADATA\.DIM", # Too generic name, check also a band + r"IMAGERY\.TIF", + ], Constellation.S2_SIN: { "nested": 1, # File that can be found at any level (product/**/file) "regex": [