-
Notifications
You must be signed in to change notification settings - Fork 20
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
Ability to add generic per-band attributes #147
Comments
Thanks @caitlinadams, tangentially related issue opendatacube/odc-geo#117 This won't be a huge addition if we stick with "user-supplied only" interface. I guess config dictionary is the right spot for this, although we have been moving away from relying on this parameter, for example per band dtype and nodata can be configured via a more direct |
Thanks @Kirill888 -- I agree that this is related to the odc-geo issue on opinionated masking. I hadn't realised that odc-stack can handle both I think it's a reasonable suggestion to have a keyword argument for additional attributes, matching the |
looks like it, inconsistent for sure, also odc-stac/odc/stac/loader/_reader.py Lines 20 to 27 in e8692ba
We should probably apply this to most user supplied settings:
|
That sounds good to me, thanks. Once you've implemented this, I would be happy to take a look at updating the docs/examples to make this functionality clearer, and perhaps move away from the config approach. |
The product definition document used by the Open Data Cube (e.g. Sentinel-2 in Digital Earth Africa) may contain additional per-band attributes. In the case of Sentinel-2, the key attribute is the
flags_definition
for theSCL
band, which contains pixel-quality information such as the mapping betweenSCL
values and classes (e.g.'3': cloud shadows
). This is critical to add to the returned xarray to enable cloud masking at later stages.I am not currently able to add the band-level attribute through the configuration dictionary. My workaround is to manually add the desired attribute to the specific band after loading:
I am curious whether:
The second idea would be my preference, but I don't have a good feel as to whether that's in scope for this package. My ultimate goal is to make the xarray returned from odc.stac.load for an ODC STAC as similar as possible to the xarray returned from datacube.load for the same ODC data.
The text was updated successfully, but these errors were encountered: