Borealis

integration · laravel · vue · 2021

Satellite fire detections, alerted automatically

DMH/DINAC, Paraguay, with WWF Paraguay

A public platform that pulls fire detections from four NASA satellites, matches them against areas people have drawn on a map, and emails only the people whose land is affected.

The operation

Paraguay's national meteorology and hydrology directorate (DMH/DINAC), working with WWF Paraguay, needed the public, government officials and conservation organizations to be able to see where the country was burning, in near real time, without asking anyone.

The result runs at focoscalor.meteorologia.gov.py: an interactive map carrying more than thirty toggleable layers, covering fire detections from four satellite instruments, fire risk forecasts, weather model output, and administrative and environmental reference data.

The part that was actually hard

Not the map. The alerting.

A subscriber defines an area of interest by uploading a KML file or drawing a polygon on the map. Every hour, the system has to intersect incoming fire detections against hundreds of those polygons and email only the people whose area was actually hit, and only about detections they have not already been told about.

That last constraint is what makes it difficult. The four satellite instruments report on different cadences, so the system tracks a separate acquisition cursor per satellite per subscriber. Get that wrong and people either get told twice or never get told at all, and an alerting system nobody trusts is worse than no alerting system.

The four instruments also disagree with each other. MODIS reports brightness in one set of fields, VIIRS in another; confidence is an integer in one and text in the other; the file naming conventions differ. All of it normalizes into a single table, deduplicated on a composite key, and filtered to Paraguay's bounds.

The build

Laravel with PostgreSQL and PostGIS for the spatial work, Vue with OpenLayers for the map, Redis and Horizon running the scheduled collection and the alert dispatch.

The daily report is its own pipeline: it aggregates detections by department through spatial joins, pulls the 72 hour forecast from the directorate's own weather model, renders a branded PDF and emails it as an attachment at 6 AM Paraguay time, unattended.

Data comes in from NASA FIRMS, the directorate's GeoServer, Brazil's INPE for fire risk forecasts, and the European Commission's GWIS for the Fire Weather Index.

Where it stands

Built in 2021 and maintained for about three and a half years. Several of those commits exist because NASA changed the FIRMS API underneath it. That is the honest shape of a system that depends on someone else's data: staying up is work, not a one-time delivery.