Skip to content

About

Simplified PlanetScope pipeline for clustering locations, querying satellite imagery, and downloading thumbnails — developed as part of an environmental science & QGIS project.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Geospatial API Toolkit

Automated satellite imagery pipeline combining Planet API and Google Earth Engine.

Python GEE License: MIT

Author: Bouchra Daddaoui · @Bouchra159


What It Does

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

Quick Start

1. Install

pip install -r geospatial_API_portfolio/requirements.txt
# or with Conda:
conda env create -f geospatial_API_portfolio/ee_env.yml
conda activate ee_env

2. Cluster your locations

python geospatial_API_portfolio/Cluster.py \
  --input_csv geospatial_API_portfolio/examples/locations.csv \
  --epsilon 0.01 --min_samples 2

Outputs clusters.png — a map of spatially grouped sampling sites.

3. Query Planet API for available imagery

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.2

4. Export GeoTIFF from Google Earth Engine

python 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.json

Project Structure

Geospatial-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

Use Cases

  • 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

Related Projects


License

MIT © Bouchra Daddaoui

About

Simplified PlanetScope pipeline for clustering locations, querying satellite imagery, and downloading thumbnails — developed as part of an environmental science & QGIS project.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages