Generate a LIST of USGS Collection 2 Image IDs for ingestion by USGS/EROS Machine-to-Machine API for BULK download.
Metadata subsetting tool in the form of a Python function.
The tool allows a user to subset a USGS Collection 2 metadata CSV file using the following parameters:
- Path
- Row
- Tier (1 or 2)
- Cloud Cover (<= than %)
- Timeframe (from/to)
- Previous Image ID list (if available--to avoid repeated image downloads)
- Mission (Landsat 4-5,7,8 Level-1 or Level-2)
- User credentials to login to USGS EarthExplorer (free).
- Approved access to USGS machine-to-machine API (request for free here).
- A USGS metadata CSV file (may be obtained here).
- Alternatively, a smaller metada CSV file may be obtained in Earth Explorer:
- Row and Path information may be obtained in the attached kml file or in this link.
Examples:
Catalunya, Spain:
usgsPaths = [197, 198, 199]
usgsRows = [30, 31, 32]
Big Island, Hawaii:
usgsPaths = [62, 63]
usgsRows = [46, 47]
Uruguay:
usgsPaths = [222, 223, 224, 225]
usgsRows = [81, 82, 83, 84]
A clean TXT file that can be used as input in the USGS/EROS Machine-to-Machine API for BULK download.
TXT file will contain required header and image IDs.
- Link here
- In API, enter the name of TXT file as input in the code:
scenesFile = 'scenes.txt' - Pay attention to directories.
- Have fun!