Skip to content

Sentinel-2 band assets with multiple spatial resolutions #87

@jonas-eberle

Description

@jonas-eberle

Hi all,

most bands of Sentinel-2 are provided in multiple spatial resolutions (10m, 20m, 60m). The current implementation does not handle this - only the latest asset in the list of image files is listed in the STAC document (the previous ones are overwritten because of the same asset key). I guess this is not intended.

The variable band_id returned should be unique - at least when describing the original Sentinel-2 dataset, e.g. B02-10m (similar to the auxiliary images, such as visual-10m, visual-20m, visual-60m). This would reference all image files available. Otherwise only the image file with the highest spatial resolution (not the latest in list) could be referenced as an asset.

band_id_search = re.search(r'_(B\w{2})_', asset_href)
if band_id_search is not None:
band_id = band_id_search.group(1)
band = SENTINEL_BANDS[band_id]
asset = pystac.Asset(href=asset_href,
media_type=asset_media_type,
title=band.description,
roles=['data'])
item.ext.eo.set_bands([SENTINEL_BANDS[band_id]], asset)
set_asset_properties(asset)
return (band_id, asset)

Best
Jonas

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