opendatacube / odc-stac

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

stac2ds does not preserve accessories #168

Open jmettes opened 2 months ago

jmettes commented 2 months ago

Accessories, for example the thumbnail, get lost when converting to eo3.

>>> from odc.stac.eo3 import stac2ds
>>> from pystac import Item

>>> item = Item.from_file("https://earth-search.aws.element84.com/v1/collections/sentinel-2-c1-l2a/items/S2A_T01KAA_20240825T221936_L2A")
>>> 'preview' in item.assets
True
>>> dataset = next(stac2ds([item]))
>>> 'accessories' in dataset.metadata_doc
False
>>> 'thumbnail' in dataset.metadata_doc['measurements']
False