Open TomAugspurger opened 2 years ago
@TomAugspurger the essential pieces of information that xarray-sentinel reads from the manifest.safe
file are the swath names, the polarizations identifiers, the names of the annotation and measurement files and a way to associate them to swath and polarization. Anything else is nice-to-have metadata. The only exception is the ascendingNodeTime
but it is duplicated in the annotations XML, so no problem as well.
As a matter of fact I plan to address #88 before the next release where I intend to move all attributes from the Dataset
to the DataArray
and most of the STAC-like attributes to a dedicated group or to an auxiliary variable. This should clear most of the top-level dependencies from the manifest.safe
file and make the transition to a STAC item much easier.
To answer your questions:
files
is arbitrary, so we can make it cleaner if needed)Thanks for those details. I'll plan to explore this some time in the next few weeks.
Currently, users of xarray-sentinel pass the path / URL to a
manifest.safe
file, which is used to discover everything necessary to build the xarray Dataset.I'm curious whether xarray-sentinel might be able to work with a STAC item that has all the relevant information, and skip reading the
manifest.safe
file? The STAC items generated by https://github.com/stactools-packages/sentinel5p has almost all the information that's returned by https://github.com/bopen/xarray-sentinel/blob/afd6fa247ff75a851fc0a7d4e18acddbcd4af625/xarray_sentinel/esa_safe.py#L107From the attributes, it's just missing
For the
files
, I need to check what exactly is expected. It seems like https://github.com/bopen/xarray-sentinel/blob/afd6fa247ff75a851fc0a7d4e18acddbcd4af625/xarray_sentinel/esa_safe.py#L158-L160 is parsing theswath, polarization, start
. Most likely, that information will come from the assets, but I need to confirm that.So I have two questions:
xarray-sentinel
be interested in supporting reading from a STAC items? I could see something likexr.open_dataset(stac_item, engine="sentinel-1")
and inferring based on the type, or a separate engine likexr.open_dataset(stac_item, engine="sentinel-1-stac")
.manifest.safe
file?