Skip to content

Repository files navigation

Wildfire Decision Support System

An AI-powered wildfire situational awareness platform built for emergency managers. The system combines satellite hotspot data, machine learning fire spread prediction, and real-time crowd intelligence to generate structured situational briefings and support evacuation decision-making.

Built for ENGO 651 — Advanced Geospatial Topics, University of Calgary, 2025.

Live demo: https://wildfire-ai.com/demo


Screenshots

Main Map View

Real-time fire perimeter, ML-predicted risk zones, hotspots, evacuation road status, and situation dashboard.

Main Map

Crowd Field Report

Public field reports submitted during the event, with comments and Google Maps integration.

Field Report Modal

AI Situational Awareness Report — Overview

Structured executive briefing generated by 4 specialist AI agents: risk level, stat tiles, situation / key risks / immediate actions.

AI Overview

AI Report — Crowd Intelligence Tab

AI-synthesized crowd intelligence: urgent help requests, fire observations, and situational patterns extracted from field reports.

Crowd Intelligence


Features

Fire Spread Prediction

  • Logistic Regression ML model trained on VIIRS FIRMS hotspot + ERA5 weather data
  • Predicts fire perimeter at +3h / +6h / +12h horizons
  • Wind-driven analytical model as an alternative projection
  • Crowd-augmented prediction: field reports inject additional hotspot anchors

AI Agent Pipeline

Four specialist agents each return structured JSON:

Agent Output
Risk Agent Fire behaviour, growth trajectory, weather drivers, risk factors
Impact Agent Population at risk, affected communities, worsening factors
Evacuation Agent Primary + alternative routes with waypoints, road warnings
Crowd Agent Urgent help requests, fire observations, situational patterns
Summary Agent Risk level, key points, situation / key risks / immediate actions

Reports are cached in AI_report/ per timestep and invalidated when crowd data changes.

Crowd Intelligence

  • Citizens submit field reports (fire sighting, road info, help requests)
  • AI field report simulator generates GIS-informed synthetic reports for testing
  • Reports are anchored to real perimeter, road, and landmark coordinates
  • Crowd hotspots are injected into the ML prediction pipeline

Replay Timeline

  • Step through historical wildfire timesteps (Fort McMurray 2016)
  • Virtual clock synchronises crowd report timestamps with replay position
  • Satellite imagery (Sentinel-2) and weather data update per timestep

Streaming Chat

  • Stateless AI assistant with full event context
  • Suggested questions generated from structured report fields

Architecture

Frontend (Vanilla JS + Leaflet)
    │
    ▼
Flask REST API  ──────────────────────────────────────────────────────────────
    │                                                                         │
    ├── /api/events          Fire event list + replay clock                   │
    ├── /api/events/:id/timesteps/:ts_id                                      │
    │       ├── /perimeter   ?crowd=true → crowd-augmented                    │
    │       ├── /hotspots                                                     │
    │       ├── /risk-zones                                                   │
    │       ├── /roads       Evacuation status overlay                        │
    │       ├── /population  At-risk population counts                        │
    │       ├── /report      AI analysis (cached in AI_report/)               │
    │       └── /chat        Streaming Claude/Gemini response                 │
    │                                                                         │
    └── /api/events/:id/field-reports   Crowd intelligence CRUD               │
                                                                              │
Pipeline (background thread)                                                  │
    ├── ERA5 weather download → forecast.json + wind_field.json               │
    ├── FIRMS hotspot fetch + crowd hotspot augmentation                      │
    ├── ML inference (Logistic Regression) → perimeter + risk zones (GeoJSON)             │
    └── Spatial analysis → road status + population counts                    │
                                                                              │
AI Agents (on-demand)                                                         │
    Risk → Impact → Evacuation → [Crowd] → Summary → AI_report/*.json ────────

Tech Stack

Layer Technology
Backend Python 3.11, Flask, SQLAlchemy, PostgreSQL + PostGIS
ML / Spatial Logistic Regression, scikit-learn, GeoPandas, Rasterio, Shapely
Weather ERA5 via CDS API, VIIRS FIRMS
AI Anthropic Claude API (configurable to Gemini)
Frontend Vanilla JS, Leaflet.js, CSS custom properties
Auth JWT (PyJWT), bcrypt

Getting Started

Prerequisites

  • Python 3.11+
  • PostgreSQL with PostGIS extension
  • Anthropic API key (or Google Gemini API key)
  • ERA5 CDS API credentials

Installation

git clone https://github.com/geo-raypan/wildfire-decision-support.git
cd wildfire-decision-support

pip install -r requirements.txt

Configuration

Copy .env.example to .env and fill in:

DATABASE_URL=postgresql://user:pass@localhost/wildfire
ANTHROPIC_API_KEY=sk-ant-...
SECRET_KEY=your-jwt-secret

Run

cd backend
python main.py

The server starts on http://localhost:5000. Default admin credentials: admin / admin.


Data

The system uses the Fort McMurray 2016 wildfire as the primary demonstration event.

Pre-processed data (ERA5, FIRMS, fuel type rasters, ML model weights) is stored under data/events/2016_0001/ and is not included in this repository due to size. The pipeline will attempt to download and process it on first run if CDS API credentials are configured.


Project Structure

See PROJECT_STRUCTURE.md for a detailed breakdown of every module.


API Reference

Full OpenAPI 3.0 specification: docs/api.yaml

Key endpoint groups:

  • POST /api/auth/login — JWT authentication
  • GET /api/events — list fire events
  • GET /api/events/:id/timesteps/:ts_id/report — generate AI situational report
  • POST /api/events/:id/field-reports — submit crowd field report
  • POST /api/events/:id/field-reports/simulate — AI-generate synthetic field reports
  • GET /api/events/:id/timesteps/:ts_id/chat (SSE) — streaming AI chat

About

AI-powered geospatial decision support system for wildfire analysis, spread forecasting, and evacuation planning using historical data replay and scenario simulation.

Topics

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages