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

Fix #145: remove nested=-1 for SPOT constellations, use the default n… #146

Merged
merged 3 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down
33 changes: 12 additions & 21 deletions eoreader/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down