0

I'm trying to download Sentinel-2 data in Level 2A from Google Cloud Storage.

Level 1C works perfect with the following (already discussed) method: Download script for L1C

Now I want to do the same with L2A data but I do not know how to change the existing function query_sentinel.

Could anybody help me?

1
  • Is there someoene who can answer my question? Mar 11, 2020 at 19:26

3 Answers 3

0

Sentinel-2 L2A imagery cannot be downloaded from Google. Only L1C data is available there. You can download L2A data from AWS (chargeable) or for free using the Sentinelsat API.

0

I am not too familiar with using the Google Cloud Storage API. However I have worked with google earth engine python api and I would think that GEE uses the S2 imagery on GCS. From the GEE api, S2-L2A is available: https://developers.google.com/earth-engine/datasets/catalog/COPERNICUS_S2_SR which means that it should be available on GCS. I attach a screenshot of a random bucket on GCS that contains S2 L2A data. So unlike the previous answer, it is there, you just need to find it. However like the previous answer, if you want to download a full S-2 scene, Sentinelsat python api is the way to go.

It is as easy as:

import shapely
import sentinelsat
from datetime import datetime

# you need a scihub acount (https://scihub.copernicus.eu/dhus/#/home)
userName = 'your_user_name'
pswrd = 'your_password'
SSapi = SentinelAPI(userName , pswrd , 'https://scihub.copernicus.eu/dhus')

AOI = shapely.geometry.polygon([[x1,y1],[x2,y1],[x2,y2],[x1,y2]]) # epsg:4326 coordiantes
timeFrame = ('20190201', datetime.date(2019,3,1)) # strange format but that works
platform = 'Sentinel-2'
maxcc = 80 # maximum cloud clover
level = 'S2MSI2A' # specify for L2A

myQuery= SSapi.query(AOI.wkt, date=timeFrame, platformname=platform , cloudcoverpercentage = (0,maxcc), producttype =level)

SSapi.download_all(myQuery, directory_path='C:/path/to/output/folder')


Hope it helps

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.