Skip to main content

Python library for post-fire assessment and wildfire analysis using Google Earth Engine.

Project description

Project Architecture (Overview)

The wildfire-analyser project is organized into three conceptual layers:

  • Core library (fire_assessment)
    Implements scientific computation, dependency resolution, and Earth Engine logic.

  • Execution layer (DAG)
    Automatically resolves and executes dependencies required for each deliverable.

  • Command-line interfaces (CLI)
    User-facing tools for running analyses and monitoring Earth Engine tasks.

Outputs

All generated outputs (GeoTIFFs, thumbnails, statistics) are considered runtime artifacts and are not committed to version control.

Scientific Background

This project is based on the peer-reviewed study:

Spatial and statistical analysis of burned areas with Landsat-8/9 and Sentinel-2 satellites: 2023 Çanakkale forest fires Authors: Deniz Bitek, Fusun Balik Sanli, Ramazan Cuneyt Erenoglu Study area: Çanakkale Province, Turkey

The methodology implemented in wildfire-analyser follows the same analytical framework and burn severity thresholds described in the paper, particularly for the Sentinel-2–based analysis, including:

  • dNBR, dNDVI and RBR indices
  • Burn severity classification tables
  • Area statistics in hectares and percentage

Minor numerical differences may occur due to cloud masking, spatial sampling, and Google Earth Engine implementation details.


Installation and Usage

Follow the steps below to install and test wildfire-analyser inside an isolated environment:

mkdir test
cd test

python3 -m venv venv
source venv/bin/activate

pip install wildfire-analyser

Required Files Before Running the Client

Before running the client, you must prepare the following items:


1. Add a GeoJSON polygon (ROI)

Create a folder named polygons in the project root and place your ROI polygon file inside it:

/tmp/test/
├── polygons/
│   └── your_polygon.geojson
└── venv/

Example GeoJSON files are available in the repository (e.g. canakkale_aoi_1.geojson).


2. Create the .env file with GEE credentials

In the project root, add a .env file containing your Google Earth Engine authentication variables.

A .env.template file is available in the repository.

/tmp/test/
├── .env
├── polygons/
└── venv/

Running the Client (Standard Mode)

After adding the .env file and your GeoJSON polygon:

python3 -m wildfire_analyser.cli \
  --roi polygons/canakkale_aoi_1.geojson \
  --start-date 2023-07-01 \
  --end-date 2023-07-21 \
  --deliverables \
    DNBR_VISUAL \
    DNDVI_VISUAL \
    RBR_VISUAL \
    DNBR_AREA_STATISTICS \
    DNDVI_AREA_STATISTICS \
    RBR_AREA_STATISTICS \
  --days-before-after 1

This will:

  • Run the post-fire assessment pipeline
  • Generate visual thumbnail URLs
  • Generate scientific GeoTIFF outputs (when applicable)
  • Compute burned area statistics
  • Print all results to the terminal

Deliverables

You may explicitly select deliverables using --deliverables.

Scientific products

  • RGB_PRE_FIRE
  • RGB_POST_FIRE
  • NDVI_PRE_FIRE
  • NDVI_POST_FIRE
  • NBR_PRE_FIRE
  • NBR_POST_FIRE
  • DNDVI
  • DNBR
  • RBR

Visual products

  • RGB_PRE_FIRE_VISUAL
  • RGB_POST_FIRE_VISUAL
  • DNDVI_VISUAL
  • DNBR_VISUAL
  • RBR_VISUAL

Severity maps and statistics

  • DNBR_AREA_STATISTICS
  • DNDVI_AREA_STATISTICS
  • RBR_AREA_STATISTICS

Example:

python3 -m wildfire_analyser.cli \
   --roi polygons/canakkale_aoi_1.geojson \
   --start-date 2023-07-01 \
   --end-date 2023-07-21 \
   --deliverables DNBR_VISUAL DNBR_AREA_STATISTICS \
   --days-before-after 1

If --deliverables is not provided, all available deliverables are generated.


Paper Preset Mode (Reproducibility)

The client also supports paper presets, which are predefined experimental configurations designed to reproduce published results.

Example preset: PAPER_DENIZ_FUSUN_RAMAZAN

Run:

python3 -m wildfire_analyser.cli \
  --deliverables PAPER_DENIZ_FUSUN_RAMAZAN

This preset:

  • Executes the analysis for two distinct burned areas
  • Uses paper-aligned temporal windows
  • Generates only visual outputs and statistics
  • Does not export scientific GeoTIFFs
  • Prints results grouped by area

Internally, it runs:

Area ROI Pre-fire Post-fire
Area 1 canakkale_aoi_1.geojson 2023-07-01 2023-07-21
Area 2 canakkale_aoi_2.geojson 2023-07-31 2023-08-30

Help

For help and full usage information:

python3 -m wildfire_analyser.cli --help

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wildfire_analyser-0.2.12.tar.gz (26.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wildfire_analyser-0.2.12-py3-none-any.whl (37.9 kB view details)

Uploaded Python 3

File details

Details for the file wildfire_analyser-0.2.12.tar.gz.

File metadata

  • Download URL: wildfire_analyser-0.2.12.tar.gz
  • Upload date:
  • Size: 26.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for wildfire_analyser-0.2.12.tar.gz
Algorithm Hash digest
SHA256 e907e01c8e4cec1fc34bd33f3723cfb5d2e56069d48e049428d25b5e49f89d17
MD5 1bc20b015b98007a438bf13c1ce634c4
BLAKE2b-256 c963e652aa91810a510d2aa6401830d565da5efd998376f8617a3d63f1ef466c

See more details on using hashes here.

File details

Details for the file wildfire_analyser-0.2.12-py3-none-any.whl.

File metadata

File hashes

Hashes for wildfire_analyser-0.2.12-py3-none-any.whl
Algorithm Hash digest
SHA256 a3b4432e9b360c317f5af4b56c5c8fc49fcef185920f412feb93fa82c31bfb92
MD5 ceec2f4837b154039b7b0b56e4604b4c
BLAKE2b-256 b1f5cf562f51482fc66816c36c97957037f97b8456454419975c45b61bac95f7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page