Skip to main content

I am trying to download images using AwsTileRequest with sentinelhub py .

I have managed to get list of all the availble tile for given geoemtry with this script:


search_bbox = BBox(bbox_coords_wgs84, crs=CRS.WGS84)
search_time_interval = ('2020-11-28T00:00:00', '2020-12-09T23:59:59')


wfs_iterator = WebFeatureService(
search_bbox,
search_time_interval,
data_collection=DataCollection.SENTINEL2_L2A,
maxcc=1.0,
config=config
)

imgs_id=[]
dates=[]


for tile_info in wfs_iterator:
#print(tile_info)
tile_id=tile_info['properties']['id']
date=tile_info['properties']['date']
imgs_id.append(tile_id)

but when I try to download the images I get the TileMissingException.


for i in imgs_id:


        tile_id=i
print(tile_id)
tile_name, time, aws_index = AwsTile.tile_id_to_tile(tile_id)
print(tile_name,time,aws_index)

bands = ['NDVI']
metafiles = ['tileInfo', 'preview', 'qi/MSK_CLOUDS_B00']
data_folder = './AwsData'

request = AwsTileRequest(
tile=tile_name,
time=time,
aws_index=aws_index,
bands=bands,
metafiles=metafiles,
data_folder=data_folder,
data_collection=DataCollection.SENTINEL2_L2A
)
request.save_data() # This is where the download is triggered

I overcome this by using try and except, but I would like to understand- why those images are not available? I saw in posts from last year that it was a bug that was fixed in the past.

What is the reason that those tiles exist but not acessible?


Edit: seems like this issue occurs only for datacollection SETINEL2_L2A!


Is that mean that you have acess only to TOA?

Can you be a bit more specific, e.g. for which tiles you get an error?


Sentinel-2 L2A is “bottom of the atmosphere” and it obviously is stored on AWS.


Hi, I have the same issue with downloading 2021 L2A data. My AOI is in Canada, and none of the tile_id works. Have you find out why? Thank you!


Reply