Featured

Land Fire Alerts (LFA) - International Wildfire Monitoring

ResearchContext: Kasetsart University / NOAA / NASA
PythonPostGISFlaskFoliumMapLibreLINE APIGmail API
Land Fire Alerts (LFA) - International Wildfire Monitoring
Presented the international LFA project at the United Nations (UN) — Thailand

Real-time satellite wildfire monitoring platform built for NOAA, NASA, AFoCO, the Royal Forest Department, and Kasetsart University. Deployed in production across 4 countries (Thailand, Cambodia, Laos, Vietnam), used daily by government officials and high-level decision-makers for environmental crisis response.


Data Engineering Pipeline

1775919166954-6d2ei7.png

Fully autonomous ETL daemon running 24/7, polling the Gmail API every 5 minutes for satellite fire detection data from VIIRS & MODIS sensors aboard NOAA-20, NOAA-21, and S-NPP satellites (375m resolution).

  • Ingests CSV/KML attachments and normalizes heterogeneous data formats (NASA vs. NOAA schemas)
  • Deduplicates alerts by geolocation and date across concurrent satellite passes
  • Performs spatial enrichment via PostGIS point-in-polygon queries against 6 geographic boundary layers: provinces, districts, subdistricts, protected areas, reserved forests, and 14 forest management zones
  • Bulk insertion into PostgreSQL with ON CONFLICT resolution ensuring data integrity

Geospatial Visualization

1775920313453-xoaycj.png

Generates interactive Folium/Leaflet maps displaying up to ~3,500 concurrent fire markers, capped and prioritized by freshness for browser performance.

  • Time-based alert layering: latest 6h, today, yesterday
  • Satellite-specific color coding with custom marker icons for restricted zones (national parks, reserved forests)
  • Rich popups: dual-coordinate display (WGS84 + UTM), administrative names in Thai & English, fire confidence scores, Fire Radiative Power (FRP), and direct Google Maps link
  • 6 toggleable GeoJSON boundary overlays with hover tooltips

Alerting & Operations

Multi-channel notification system with full resilience through configurable retry decorators with exponential backoff on all external calls.

  • LINE Bot: auto-registering users and groups via webhook, push alert messages to stakeholders with direct map links
  • Discord webhooks: severity-based routing across 3 channels (critical / error / info), log file attachments, and automated success-rate metrics per pipeline run

Web Application

1775920347449-toizmz.png

Flask + Jinja2 frontend serving the operational interface.

  • Session-based admin panel with runtime configuration toggles (consumed by the daemon via REST API)
  • Map archive browser with chronological navigation by year/month
  • Excel data export: per-satellite sheets with geographic name enrichment from PostGIS lookups
  • Automatic cleanup of maps and exports older than 3 days

Deployment & Reliability

Designed for uninterrupted 24/7 operation on a Linux VM behind Apache WSGI.

  • Structured multi-tier logging: global daemon logs, per-email processing logs, and bot event logs
  • Explicit memory management with variable cleanup per loop iteration to prevent leaks in long-running processes
  • Geographic data caching (PostGIS → CSV with WKT serialization) minimizing database load on repeated runs

Tech Stack

PythonFlaskPostgreSQL/PostGISPandas/GeoPandasFolium/Leafletpsycopg2SQLAlchemyGmail API (OAuth2)LINE Messaging APIDiscord WebhooksPandasShapely / Pyproj