sat-utils / sat-stac-sentinel

Creation of a Sentinel Spatio-Temporal Asset Catalog (STAC) from inventory of the Sentinel public dataset on AWS
MIT License
21 stars 4 forks source link

sentinel2 asset errors #16

Closed samsammurphy closed 4 years ago

samsammurphy commented 5 years ago

Moving this issue to the correct repo. Also related to #11 ...


Sentinel2 assets are sometimes incorrect. For example..

from satstac import Catalog, Collection, Item

cat = Catalog.open('https://sentinel-stac.s3.amazonaws.com/catalog.json')

col = Collection.open('https://sentinel-stac.s3.amazonaws.com/sentinel-2-l1c/catalog.json')

item = Item.open('https://sentinel-stac.s3.amazonaws.com/sentinel-2-l1c/15/S/UB/2018-04-17/S2B_15SUB_20180417_0.json')

for k in item.assets:
    print(k, item.assets[k])

will print..

thumbnail {'title': 'Thumbnail', 'href': 'https://roda.sentinel-hub.com/sentinel-s2-l1c/tiles/15/S/UB/2018/4/17/0/preview.jpg'}
info {'title': 'Basic JSON metadata', 'href': 'https://roda.sentinel-hub.com/sentinel-s2-l1c/tiles/15/S/UB/2018/4/17/0/tileInfo.json'}
metadata {'title': 'Complete XML metadata', 'href': 'https://roda.sentinel-hub.com/sentinel-s2-l1c/tiles/15/S/UB/2018/4/17/0/metadata.xml'}
tki {'title': 'True color image', 'type': 'image/jp2', 'eo:bands': [3, 2, 1], 'href': 'https://sentinel-s2-l1c.s3.amazonaws.com/tiles/15/S/UB/2018/4/17/0/TKI.jp2'}
B01 {'title': 'Band 1 (coastal)', 'type': 'image/jp2', 'eo:bands': [0], 'href': 'https://sentinel-s2-l1c.s3.amazonaws.com/tiles/15/S/UB/2018/4/17/0/B01.jp2'}
B02 {'title': 'Band 2 (blue)', 'type': 'image/jp2', 'eo:bands': [2], 'href': 'https://sentinel-s2-l1c.s3.amazonaws.com/tiles/15/S/UB/2018/4/17/0/B02.jp2'}
B03 {'title': 'Band 3 (green)', 'type': 'image/jp2', 'eo:bands': [2], 'href': 'https://sentinel-s2-l1c.s3.amazonaws.com/tiles/15/S/UB/2018/4/17/0/B03.jp2'}
B04 {'title': 'Band 4 (red)', 'type': 'image/jp2', 'eo:bands': [3], 'href': 'https://sentinel-s2-l1c.s3.amazonaws.com/tiles/15/S/UB/2018/4/17/0/B04.jp2'}
B05 {'title': 'Band 5', 'type': 'image/jp2', 'eo:bands': [4], 'href': 'https://sentinel-s2-l1c.s3.amazonaws.com/tiles/15/S/UB/2018/4/17/0/B05.jp2'}
B06 {'title': 'Band 6', 'type': 'image/jp2', 'eo:bands': [5], 'href': 'https://sentinel-s2-l1c.s3.amazonaws.com/tiles/15/S/UB/2018/4/17/0/B06.jp2'}
B07 {'title': 'Band 7', 'type': 'image/jp2', 'eo:bands': [6], 'href': 'https://sentinel-s2-l1c.s3.amazonaws.com/tiles/15/S/UB/2018/4/17/0/B07.jp2'}
B08 {'title': 'Band 8 (nir)', 'type': 'image/jp2', 'eo:bands': [7], 'href': 'https://sentinel-s2-l1c.s3.amazonaws.com/tiles/15/S/UB/2018/4/17/0/B08.jp2'}
B8A {'title': 'Band 8A', 'type': 'image/jp2', 'eo:bands': [8], 'href': 'https://sentinel-s2-l1c.s3.amazonaws.com/tiles/15/S/UB/2018/4/17/0/B08.jp2'}
B09 {'title': 'Band 9', 'type': 'image/jp2', 'eo:bands': [9], 'href': 'https://sentinel-s2-l1c.s3.amazonaws.com/tiles/15/S/UB/2018/4/17/0/B09.jp2'}
B10 {'title': 'Band 10 (cirrus)', 'type': 'image/jp2', 'eo:bands': [10], 'href': 'https://sentinel-s2-l1c.s3.amazonaws.com/tiles/15/S/UB/2018/4/17/0/B10.jp2'}
B11 {'title': 'Band 11 (swir16)', 'type': 'image/jp2', 'eo:bands': [11], 'href': 'https://sentinel-s2-l1c.s3.amazonaws.com/tiles/15/S/UB/2018/4/17/0/B11.jp2'}
B12 {'title': 'Band 12 (swir22)', 'type': 'image/jp2', 'eo:bands': [12], 'href': 'https://sentinel-s2-l1c.s3.amazonaws.com/tiles/15/S/UB/2018/4/17/0/B11.jp2'}

which has the following mistakes..

samsammurphy commented 5 years ago

dev branch already has solution for B8A and I just proposed a PR for B12

.. didn't have time to see where to fix B02 eo:bands allocation

matthewhanson commented 4 years ago

This should be fixed on the develop branch which is targeting STAC 0.9.0, but that has not been released yet. So the final version of sat-stac-sentinel will wait until that is released, should be in the next few weeks.