Python library for post-fire assessment and wildfire analysis using Google Earth Engine.
Project description
wildfire-analyser
wildfire-analyser is a Python library for post-fire assessment with Sentinel-2 imagery in Google Earth Engine. It generates three kinds of outputs from a region of interest (ROI): scientific rasters, visual previews, and burned-area statistics.
The project is organized around a dependency-driven workflow, so the CLI only computes what is required for the deliverables you request.
What It Produces
- Scientific products exported as GeoTIFFs to Google Cloud Storage
- Visual products returned as Google Earth Engine thumbnail URLs
- Burned-area statistics for dNBR, dNDVI, and RBR
Requirements
Before running the CLI, prepare:
- A GeoJSON polygon file for the ROI
- A Google Earth Engine service account credential in
GEE_PRIVATE_KEY_JSON - A Google Cloud Storage bucket name in
GCS_BUCKET_NAMEif you request scientific deliverables
GCS_BUCKET_NAME is only required for scientific deliverables exported to Google Cloud Storage. Visual outputs and statistics do not require a bucket.
Quickstart (Repository)
python3 -m venv venv
./venv/bin/pip install -r requirements.txt
cp wildfire_analyser/.env.template .env
Then edit .env with your real Earth Engine credentials and, if needed, your bucket name. Place your ROI GeoJSON under polygons/.
Example layout:
.
├── .env
├── polygons/
│ └── ccanakkale01.geojson
└── venv/
Run the CLI
Minimal example:
./venv/bin/python -m wildfire_analyser.cli \
--roi polygons/ccanakkale01.geojson \
--start-date 2023-07-01 \
--end-date 2023-07-21 \
--deliverables DNBR_VISUAL DNBR_AREA_STATISTICS
Example with more outputs:
./venv/bin/python -m wildfire_analyser.cli \
--roi polygons/eejatai.geojson \
--start-date 2024-09-26 \
--end-date 2024-10-05 \
--deliverables RGB_PRE_FIRE_VISUAL RGB_POST_FIRE_VISUAL DNBR_VISUAL DNBR_AREA_STATISTICS
If --deliverables is omitted, the CLI requests every deliverable defined in wildfire_analyser/fire_assessment/deliverables.py.
That includes scientific exports, so GCS_BUCKET_NAME becomes required in that case.
Deliverables
Scientific:
RGB_PRE_FIRE, RGB_POST_FIRE, NDVI_PRE_FIRE, NDVI_POST_FIRE, NBR_PRE_FIRE, NBR_POST_FIRE, DNDVI, DNBR, RBR
Visual:
RGB_PRE_FIRE_VISUAL, RGB_POST_FIRE_VISUAL, DNDVI_VISUAL, DNBR_VISUAL, RBR_VISUAL
Statistics:
DNBR_AREA_STATISTICS, DNDVI_AREA_STATISTICS, RBR_AREA_STATISTICS
Useful Flags
--days-before-after: temporal buffer around the event window. Default:30--cloud-threshold: maximum allowed scene cloud percentage. Default:100--fire-mosaic-strategy: one ofbest_date_mosaic,best_date_masked_mosaic,best_available_per_tile_mosaic,cloud_masked_light_mosaic. Default:best_available_per_tile_mosaic--roi-only: clips visual thumbnails to the ROI footprint instead of its bounding box--roi-only-bg-color: background color outside the ROI when--roi-onlyis used. Default:black
Full CLI help:
./venv/bin/python -m wildfire_analyser.cli --help
Paper Preset
The CLI includes one preset for the Canakkale case study:
./venv/bin/python -m wildfire_analyser.cli \
--deliverables PAPER_DENIZ_FUSUN_RAMAZAN
This preset runs two predefined ROIs, produces visual outputs and statistics, and compares the computed statistics against the reference values embedded in the CLI implementation.
The preset uses its own fixed internal configuration for scene selection.
Notes on Methodology
The implementation follows the same general analytical structure used in the Canakkale wildfire case study: Sentinel-2 composites, dNBR, dNDVI, RBR, severity-class statistics, and reproducible execution through a fixed workflow. For the paper preset, the intent is reproducible selection under preset-defined conditions rather than a user-adjustable temporal window. Numerical differences can still occur because of cloud filtering, mosaic strategy, and Earth Engine execution details.
Additional Docs
- Environment setup:
docs/environment-setup.md - GEE task monitoring:
docs/gee_task_monitoring.md - Development notes:
docs/development.md
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wildfire_analyser-1.0.1.tar.gz.
File metadata
- Download URL: wildfire_analyser-1.0.1.tar.gz
- Upload date:
- Size: 21.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5301701b33ff0fb1e73f3869ac450cb1210ef14e201b8cef81e6c1fb7e7bbe53
|
|
| MD5 |
2342062cf2c5cad8773c74741bf07ce6
|
|
| BLAKE2b-256 |
0862876ecb85816a37ac2f9e6e97fe264e313770880a10b7b76adee838105d16
|
File details
Details for the file wildfire_analyser-1.0.1-py3-none-any.whl.
File metadata
- Download URL: wildfire_analyser-1.0.1-py3-none-any.whl
- Upload date:
- Size: 29.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e37dd9aeef92827ac2f3a3ef94b549531b2cdd36e60029b183b85176ea292ad
|
|
| MD5 |
07b3346b2b18d9dfc8712bcb222df782
|
|
| BLAKE2b-256 |
8f2e7aa4cf6b80583a11b1169a582c6ec1002e3736cc4a906a88b2f4e36d2a05
|