Automate Sentinel 2 Ingestion via GitHub Actions.
OBJECTIVE: Automate Sentinel 2 ingestion via GitHub Actions and Python.
STEPS INVOLVED:
- Download data from ESA Copernicus based on Sentinel product ID.
- Resample 20m bands to 10m.
- Merge all 10m bands into single zarr.
- Upload zarr to S3.
- Automate entire process in GitHub Actions.
LIBRARIES USED:
- sentinelsat
- gdal
- xarray
- s3fs
- dotenv
- os
- glob
- argparse
- zipfile
WORKING: Enter the product ID in action workflows. The contents will be downloaded using SentinelAPI. The 20m bands will be resampled to 10m bands using gdal's warp function. The original 10m and resampled 10m bands are appended to a unified list bands. Merged the contents of the list bands using xarray's merge function. Finally converted the entire list into a single zarr and uploaded to S3. Credentials are fetched from environment variables to avoid hardcoding in the codebase.