sat-utils / sat-search

A python client for sat-api
MIT License
189 stars 43 forks source link

Multiple images per date returned for Sen-2 L2A COGs AWS search #116

Open sid-ks opened 3 years ago

sid-ks commented 3 years ago

Hi, I have been using sat-search quite a bit, and when making a time series graph , noticed that there are 2 observations per date, for Sen-2 L2A from AWS.

So I simply went back to look at the items listed from catalog -

dates = '2020-08-01/2020-08-30'

# request goes with wgs84 bounding box
URL='https://earth-search.aws.element84.com/v0'
results = satsearch.Search.search(url=URL,
                                  collections=['sentinel-s2-l2a-cogs'], 
                                  datetime=dates,
                                  bbox=wgs_bound,    
                                  sort=['<datetime'],
                                  query=['eo:cloud_cover<=1'])
items = results.items()
catalog = intake.open_stac_item_collection(items)

print(list(catalog)) gives -


 ['S2A_43QFA_20200829_0_L2A',
 ['S2A_43QFB_20200829_0_L2A',
 ['S2B_43QFA_20200824_0_L2A',
 ['S2B_43QFB_20200824_0_L2A',
 ['S2A_43QFA_20200819_0_L2A',
 ['S2A_43QFB_20200819_0_L2A',
 ['S2B_43QFA_20200814_0_L2A',
 ['S2B_43QFB_20200814_0_L2A',
 ['S2A_43QFA_20200809_0_L2A',
 ['S2A_43QFB_20200809_0_L2A',
 ['S2B_43QFA_20200804_0_L2A',
 ['S2B_43QFB_20200804_0_L2A']

some rough string manipulation on items.summary(['date', 'id', 'eo:cloud_cover']) gives the below list -


[['2020-08-29', 'S2A_43QFA_20200829_0_L2A', '0'],
 ['2020-08-29', 'S2A_43QFB_20200829_0_L2A', '0'],
 ['2020-08-24', 'S2B_43QFA_20200824_0_L2A', '0'],
 ['2020-08-24', 'S2B_43QFB_20200824_0_L2A', '0'],
 ['2020-08-19', 'S2A_43QFA_20200819_0_L2A', '99.94'],
 ['2020-08-19', 'S2A_43QFB_20200819_0_L2A', '99.33'],
 ['2020-08-14', 'S2B_43QFA_20200814_0_L2A', '97.38'],
 ['2020-08-14', 'S2B_43QFB_20200814_0_L2A', '97.37'],
 ['2020-08-09', 'S2A_43QFA_20200809_0_L2A', '96.97'],
 ['2020-08-09', 'S2A_43QFB_20200809_0_L2A', '99.5'],
 ['2020-08-04', 'S2B_43QFA_20200804_0_L2A', '91.72'],
 ['2020-08-04', 'S2B_43QFB_20200804_0_L2A', '86.68']]

So, im wondering why are there two images per date? And, they have different "cloud cover" percentages too.

sat-search version - (v.0.3.0)

Thanks in advance for any leads on this.

print-sid8 commented 3 years ago

Anyone have any comments/updates on this? Thank you!