Closed claytharrison closed 3 months ago
@claytharrison and @npikall, you can now use a regex to get the appropriate band:
product.driver.get_data_address(product, r"^(?!.*MSK).*B04_10m.*$")
This is not available yet in a stable release, but through develop
branch that you can install using:
pip install git+https://github.com/CS-SI/eodag-cube.git@develop
Describe the bug Calling
get_data
on recently-processed products fromS2_MSI_L2A
returns mask data rather than band data for anyB**
-labeled bands.Since at least processing baseline 04.00, band masks in the
QI_DATA
folder forS2_MSI_L2A
products have been stored as.jp2
files, rather than as.gml
files as they were before. These filenames contain the same band string as the actual image data filenames (e.g.QI_DATA/MSK_DETFOO_B04.jp2
compared toIMG_DATA/T33UWP_20221128T095341_B04_10m.jp2
).They end up at the front of the glob result that
get_data_address
computes, and then get returned by that function instead of the path to the actual band data.Code To Reproduce
Output
Environment:
Python 3.9.18
version 2.12.1
0.4.1
Additional context I haven't checked this with any other providers, and I'm not sure if the issue goes back further than PB04.00 or not. It's definitely fine in PB03.01. Additionally, the
S2_MSI_L2A_COG
product from Copernicus Data Space works just fine for the same recent dates, but I guess that gets handled totally differently on the backend.