A full geospatial data pipeline ingesting wildfire perimeter data into PostGIS, serving it via GeoServer WMS, and displaying it on an interactive map.
GeoJSON data → ogr2ogr → PostGIS → GeoServer WMS → OpenLayers browser map
- PostgreSQL + PostGIS — spatial database storing fire perimeter geometries
- GDAL/ogr2ogr — ingesting GeoJSON into PostGIS with a single command
- GeoServer — publishing PostGIS data as a WMS (Web Map Service)
- OpenLayers — browser map consuming the WMS layer
- OpenStreetMap — basemap tiles
Five largest 2024 California wildfires by acreage:
| Fire | Acres | Location |
|---|---|---|
| Park Fire | 429,603 | Butte/Tehama County |
| Boling Fire | 53,800 | Mariposa County |
| Bridge Fire | 53,000 | Los Angeles County |
| Line Fire | 38,000 | San Bernardino County |
| Airport Fire | 23,000 | Orange County |
- PostgreSQL 16+
- PostGIS 3.4+
- GDAL (
sudo apt install gdal-bin) - GeoServer 2.25+ (download from geoserver.org)
- Python 3 (for the map server)
sudo -u postgres psql -f sql/setup.sqlogr2ogr \
-f "PostgreSQL" \
PG:"host=localhost dbname=wildfire user=wildfire_user password=wildfire123" \
data/ca_fires.geojson \
-nln fire_perimeters \
-nlt MULTIPOLYGON \
-t_srs EPSG:4326- Start GeoServer and open http://localhost:8090/geoserver/web
- Create workspace:
wildfire(namespace:http://wildfire) - Add PostGIS store: host=localhost, port=5432, database=wildfire, user=wildfire_user
- Publish
fire_perimeterslayer — click "Compute from data" for bounding boxes
python3 -m http.server 8091Open http://localhost:8091/map.html
SELECT fire_name,
acres AS reported_acres,
round((ST_Area(wkb_geometry::geography) / 4047)::numeric, 0) AS calculated_acres
FROM fire_perimeters;- Spatial data ingestion with
ogr2ogr - PostGIS geometry types and spatial indexing
- WMS (Web Map Service) protocol
- Coordinate reference systems (EPSG:4326, EPSG:3857)
- Consuming OGC web services in a browser map
