← Back to Portfolio
Geospatial & Climate AI•

Leveraging Geospatial AI & PostGIS for Climate-Driven Disaster Mitigation

How spatial databases and machine learning can be combined to build predictive hazard maps that save lives — lessons from the NDMA ResilientPath AI project.


Modern disaster management demands more than reactive response — it demands foresight. During my internship at NDMA Pakistan, I faced the challenge of building a system that could aggregate real-time hazard data from multiple sources, perform spatial clustering, and surface actionable early-warning intelligence to decision-makers.

PostGIS, an extension to PostgreSQL, proved to be the backbone of this architecture. Its native support for geometric and geographic data types allowed us to store and query spatial hazard data with sub-second latency. Combined with Leaflet for the visualization layer, we built interactive dashboards that rendered flood risk zones, landslide susceptibility maps, and earthquake exposure indices on top of live sensor data.

The key breakthrough was treating the problem as a spatial graph: every reported hazard event is a node, and proximity relationships define the edges. Clustering algorithms like DBSCAN — adapted for geodetic distance — naturally grouped co-located events, surfacing emerging multi-hazard situations that traditional threshold-based alerting would miss entirely.

The offline-first PWA architecture ensured field responders in low-connectivity areas could access critical maps and receive push updates when connectivity was restored. This combination of geospatial intelligence, ML clustering, and resilient offline capability is, I believe, the future of disaster preparedness for climate-vulnerable regions.

Author: Noor Ul AminExplore more insights →