-
Notifications
You must be signed in to change notification settings - Fork 28
Description
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.
stactools/stactools_sentinel2/stactools/sentinel2/stac.py
Lines 187 to 197 in 0c66a85
| 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