Landsat data is available from a public bucket located in the Oregon region of AWS. The
bucket is s3://usgs-landsat
and requires "requester pays" access.
aws s3 ls --request-payer requester s3://usgs-landsat/collection02/level-2/
An ODC product definition for the Landsat surface reflectance data is inluded in this repo. Add this to datacube using the following command:
datacube product add products/lsX_c2l2_sr.odc-product.yaml
or
datacube product add https://raw.githubusercontent.com/opendatacube/datacube-dataset-config/main/products/lsX_c2l2_sr.odc-product.yaml
Install the scripts required by following the instructions here like this:
pip install odc_apps_dc_tools
Note that because of the requester pays requirement, you must have AWS credentials present in the environment you're working in.
Indexing for a region of interest can be done using the STAC API, like this:
stac-to-dc \
--catalog-href='https://landsatlook.usgs.gov/stac-server/' \
--rewrite-assets='https://landsatlook.usgs.gov/data/,s3://usgs-landsat/' \
--bbox='25,20,35,30' \
--collections='landsat-c2l2-sr' \
--datetime='2020-01-01/2020-03-31'
Added 707 Datasets, failed 0 Datasets
You can change the bounding box or datetime range to search anywhere in the world.
Please note that you must use AWS credentials to access the data from the requester pays bucket. The USGS has information about cloud data access here.
There are some docs here on how to set up the requester pays flag using the ODC.