Open clausmichele opened 1 week ago
I have created some example access and made some notes about my experience. Please see below and let me know how to proceed:
https://github.com/jzvolensky/cdse-stac-api/blob/master/cdse-stac-api/cdse_data_access.ipynb
Hi @jzvolensky, great that you found a way to get access to the data from STAC. Could you expand the Sentinel-2 example trying to open a file in the GRANULE
folder available at eodata/Sentinel-2/MSI/L1C/2022/02/05/S2B_MSIL1C_20220205T102119_N0400_R065_T32TPT_20220205T110638.SAFE/GRANULE
?
Getting access denied
issues for the granule. Not sure if this is the fault of CDSE or my fsspec setup
fs = fsspec.filesystem('s3', key=S3_KEY, secret=S3_SECRET, client_kwargs={'endpoint_url': 'https://eodata.dataspace.copernicus.eu'})
granule_path = 's3://eodata/Sentinel-2/MSI/L1C/2022/02/05/S2B_MSIL1C_20220205T102119_N0400_R065_T32TPT_20220205T110638.SAFE/GRANULE/L1C_T32TPT_A025688_20220205T102141/IMG_DATA/T32TPT_20220205T102119_B04.jp2'
with rasterio.open(granule_path, opener=fs.open) as src:
band4 = src.read(1)
band4_da = xarray.DataArray(band4, dims=["y", "x"])
print(band4_da)
It would be interesting to show how to access data offered by the Copernicus Data Space in different ways. CDSE offers also a STAC Catalog, but it doesn't include the actual links to the files.
Sample query to CDSE STAC: