Skip to content

Commit

Permalink
Fix #140: replace QB satellite ID with QB02 satellite ID
Browse files Browse the repository at this point in the history
  • Loading branch information
jteulade committed May 21, 2024
1 parent e89599d commit 2da8a60
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
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: 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!
- FIX: Fix issue with geocoding with unzipped `Sentinel-3 OLCI` product ([#137](https://github.com/sertit/eoreader/issues/137))
- FIX: Fix iceye product when extent file (*.kml) not found ([#135](https://github.com/sertit/eoreader/pull/135))
Expand Down
8 changes: 4 additions & 4 deletions eoreader/products/optical/maxar_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
NIR: GainOffset(gain=1.0, offset=0.0),
NARROW_NIR: GainOffset(gain=1.0, offset=0.0),
}, # 2017v0
Constellation.QB: {
Constellation.QB02: {
PAN: GainOffset(gain=0.870, offset=-1.491),
BLUE: GainOffset(gain=1.105, offset=-2.820),
GREEN: GainOffset(gain=1.071, offset=-3.338),
Expand Down Expand Up @@ -191,7 +191,7 @@
NIR: 937.8,
NARROW_NIR: 937.8,
},
Constellation.QB: {
Constellation.QB02: {
PAN: 1370.92,
BLUE: 1949.59,
GREEN: 1823.64,
Expand Down Expand Up @@ -432,7 +432,7 @@ def _set_instrument(self) -> None:
elif self.constellation == Constellation.WV04:
# SpaceView-110 camera
self.instrument = "SpaceView-110 camera"
elif self.constellation == Constellation.QB:
elif self.constellation == Constellation.QB02:
# Ball Global Imaging System 2000
self.instrument = "BGIS-2000"
elif self.constellation == Constellation.GE01:
Expand Down Expand Up @@ -575,7 +575,7 @@ def _get_spectral_bands(self) -> dict:
},
),
}
elif self.constellation == Constellation.QB:
elif self.constellation == Constellation.QB02:
spectral_bands = {
"pan": SpectralBand(
eoreader_name=PAN,
Expand Down
8 changes: 4 additions & 4 deletions eoreader/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ class Constellation(ListEnum):
HLS = "HLS"
"""Harmonized Landsat-Sentinel"""

QB = "QuickBird"
QB02 = "QuickBird"
"""QuickBird"""

GE01 = "GeoEye-1"
Expand Down Expand Up @@ -275,7 +275,7 @@ class Constellation(ListEnum):
Constellation.SPOT5: r"SP05_HRG_(HM_|J__|T__|X__|TX__|HMX)__\d_\d{8}T\d{6}_\d{8}T\d{6}_.*",
Constellation.VIS1: r"VIS1_(PAN|BUN|PSH|MS4)_.+_\d{2}-\d",
Constellation.RCM: r"RCM\d_OK\d+_PK\d+_\d_.{4,}_\d{8}_\d{6}(_(HH|VV|VH|HV|RV|RH)){1,4}_(SLC|GRC|GRD|GCC|GCD)",
Constellation.QB: r"\d{12}_\d{2}_P\d{3}_(MUL|PAN|PSH|MOS)",
Constellation.QB02: r"\d{12}_\d{2}_P\d{3}_(MUL|PAN|PSH|MOS)",
Constellation.GE01: r"\d{12}_\d{2}_P\d{3}_(MUL|PAN|PSH|MOS)",
Constellation.WV01: r"\d{12}_\d{2}_P\d{3}_(MUL|PAN|PSH|MOS)",
Constellation.WV02: r"\d{12}_\d{2}_P\d{3}_(MUL|PAN|PSH|MOS)",
Expand Down Expand Up @@ -347,7 +347,7 @@ class Constellation(ListEnum):
r"\d+_[RHV]{2}\.tif",
],
},
Constellation.QB: r"\d{2}\w{3}\d{8}-.{4}(_R\dC\d|)-\d{12}_\d{2}_P\d{3}.TIL",
Constellation.QB02: r"\d{2}\w{3}\d{8}-.{4}(_R\dC\d|)-\d{12}_\d{2}_P\d{3}.TIL",
Constellation.GE01: r"\d{2}\w{3}\d{8}-.{4}(_R\dC\d|)-\d{12}_\d{2}_P\d{3}.TIL",
Constellation.WV01: r"\d{2}\w{3}\d{8}-.{4}(_R\dC\d|)-\d{12}_\d{2}_P\d{3}.TIL",
Constellation.WV02: r"\d{2}\w{3}\d{8}-.{4}(_R\dC\d|)-\d{12}_\d{2}_P\d{3}.TIL",
Expand Down Expand Up @@ -922,7 +922,7 @@ def create_product(
constellation = None # All product names are the same, so assess it with MTD
# Maxar-like constellations
elif constellation in [
Constellation.QB,
Constellation.QB02,
Constellation.GE01,
Constellation.WV01,
Constellation.WV02,
Expand Down

0 comments on commit 2da8a60

Please sign in to comment.