opendatacube / odc-stac

Load STAC items into xarray Datasets.
Apache License 2.0
140 stars 20 forks source link

Don't assume `product._md` exists #171

Open Ariana-B opened 2 months ago

Ariana-B commented 2 months ago

A quick and easy fix for #167 The _md attribute is added to the product in infer_dc_product, but if the product is provided via the product_cache rather than inferred, it might not have the attribute (especially since datacube.model.Product does not have it), causing _item_to_ds to fail when it assumes the attribute exists. Also take the chance to update the use of DatasetType to Product.

github-actions[bot] commented 2 months ago

🚀 Deployed on https://f6d43600145741f0--odc-stac-docs.netlify.app