Automated satellite imagery pipeline combining Planet API and Google Earth Engine.
Author: Bouchra Daddaoui · @Bouchra159
This toolkit automates the full pipeline from coordinate clustering → satellite imagery query → raster export for environmental monitoring and QGIS-based spatial analysis.
| Module | Function |
|---|---|
Cluster.py |
DBSCAN clustering of geographic coordinates to identify sampling regions |
Query.py |
Query Planet API for available imagery metadata at each cluster centroid |
Thumbnail.py |
Download Planet preview thumbnails for rapid visual inspection |
imageExporter.py |
Export Sentinel-2, Landsat-8/9, or NAIP GeoTIFFs via Google Earth Engine |
Key features:
- Parallelised GEE downloads for large-scale exports
- Optional Landsat pan-sharpening (15 m from 30 m)
- QGIS-ready GeoTIFF outputs (EPSG:4326, cloud-optimised)
- Reproducible environment files for both Planet and GEE workflows
pip install -r geospatial_API_portfolio/requirements.txt
# or with Conda:
conda env create -f geospatial_API_portfolio/ee_env.yml
conda activate ee_envpython geospatial_API_portfolio/Cluster.py \
--input_csv geospatial_API_portfolio/examples/locations.csv \
--epsilon 0.01 --min_samples 2Outputs clusters.png — a map of spatially grouped sampling sites.
python geospatial_API_portfolio/Query.py \
--api_key YOUR_PLANET_API_KEY \
--coords "[[40.7128,-74.0060],[34.0522,-118.2437]]" \
--start_date 2022-06-01 --end_date 2022-09-01 \
--cloud_cover 0.2python geospatial_API_portfolio/imageExporter.py \
-f geospatial_API_portfolio/examples/locations.csv \
-d sentinel \
-s 2022-01-01 -e 2022-03-01 \
-he 512 -w 512 \
-o output_images/ \
--service_account your@project.iam.gserviceaccount.com \
--json_key path/to/key.jsonGeospatial-API-Toolkit/
├── geospatial_API_portfolio/
│ ├── Cluster.py # DBSCAN geographic clustering
│ ├── Query.py # Planet API metadata query
│ ├── Thumbnail.py # Planet thumbnail downloader
│ ├── imageExporter.py # GEE GeoTIFF exporter
│ ├── requirements.txt # Python dependencies
│ ├── examples/
│ │ ├── locations.csv # Sample coordinates
│ │ ├── clusters.png # Example cluster output
│ │ └── example_query_output.txt
│ └── notebooks/
│ └── demo.ipynb # End-to-end demo
└── README.md
- Water resource monitoring — cluster river gauge locations and pull Sentinel-2 NDWI time series
- Vegetation analysis — export Landsat NDVI mosaics for change detection
- Urban heat mapping — NAIP + Landsat thermal band exports
- Pre-processing for QGIS — GeoTIFF outputs load directly into QGIS for symbology and map production
- morocco-water-stress — reservoir and land-cover monitoring built on a similar Sentinel/Earth Engine pipeline
- China-landcover-gee — land-cover change detection in Earth Engine
MIT © Bouchra Daddaoui