Skip to content

Should STAC metadata be added to the output xarray object? #46

@jsignell

Description

@jsignell

The conventions vary.

In the common case of a single-band COG for each band of a scene, the STAC metadata holds information that may not be present in the file itself. At the simplest level the COG does not in and of itself know the datetime of the scene. So in that case the metadata from STAC needs to make it into the coordinates if we want to be able to stack (IIRC both stackstac and odc-stac do this to various levels).

But in the case of a standalone STAC collection with an asset pointing to a large Zarr store, the STAC metadata present in the catalog has likely been duplicated from the Zarr store. So in that case storing the STAC metadata on the xarray object would not be very helpful since it's already there. One caveat is that within the Zarr store the metadata might not have the STAC extension prefix (eo: or proj: for instance). So just doing an outer join of the STAC and Zarr metadata might still result in conceptual duplicates.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions