Flood Impact Raster Onboarding¶
This runbook registers, ingests, and exposes new flood raster layers in CMS/GeoManager and MapViewer.
0) Rebuild CMS image (Docker deployments)¶
If your CMS container is already running, rebuild so the new management command is available:
1) Apply migrations¶
From the project root:
This ensures the Impact subcategories exist and are active/public:
- Exposure
- Susceptibility
- Vulnerability
- Resilience
2) Prepare a manifest¶
Use docs/flood_impact_layers.manifest.example.json as a template.
Required fields per entry:
titledataset_slugsub_category(must be one of: Exposure, Susceptibility, Vulnerability, Resilience)auto_ingest_directory
Optional fields:
layer_titlesummarydate_format(defaultyyyy-MM-dd HH:mm)time_parameter(defaulttime)time_prefixpublished,public,can_clip,multi_temporal,initial_visible,current_time_method
3) Bootstrap datasets and raster layers¶
Dry-run first:
docker compose exec eafw_cms \
uv run python manage.py bootstrap_impact_flood_layers \
/opt/eafw_cms/docs/flood_impact_layers.manifest.example.json \
--dry-run
Apply changes:
docker compose exec eafw_cms \
uv run python manage.py bootstrap_impact_flood_layers \
/opt/eafw_cms/docs/flood_impact_layers.manifest.example.json
What this command does:
- Ensures Impact category/subcategories are present
- Creates or updates
raster_filedatasets - Creates or updates
RasterFileLayerwith: auto_ingest_from_directory=trueauto_ingest_use_custom_directory_name=trueauto_ingest_custom_directory_name=<manifest value>
4) Place raster files for ingestion¶
Copy files into:
GeoTIFF filenames must end with an ISO UTC timestamp:
Example:
5) Ingest raster files¶
Option A: ingest while bootstrapping:
docker compose exec eafw_cms \
uv run python manage.py bootstrap_impact_flood_layers \
/opt/eafw_cms/docs/flood_impact_layers.manifest.example.json \
--ingest --overwrite
Option B: manual per file event:
docker compose exec eafw_cms \
uv run python manage.py ingest_geomanager_raster created /geomanager/data/<dir>/<file>.tif --overwrite
6) Verify API exposure¶
Check mapviewer config includes datasets under Impact:
Check tilejson for a layer:
Check rendered tiles (with time and clipping support):
Notes:
- Use
/api/raster-tiles/...(hyphen), not/api/raster_tiles/.... geostore_idis effective when datasetcan_clip=true.
7) Verify in MapViewer¶
Open /mapviewer/, then confirm:
- Category: Impact
- Subcategories: Exposure, Susceptibility, Vulnerability, Resilience
- Datasets are visible/toggleable
- Time selector shows ingested timestamps
8) One-Command Automation¶
Use the helper script to automate the full setup for Impact flood extent layers:
What it automates:
- Copies
M6_25y_clipped.tifandM6_100y_clipped.tifintodata/mapfiles/data/return_periods/ - Configures CMS Impact category/subcategories/datasets
- Converts
Flood extent/Hazardto WMS multi-layer - Creates 2 layers:
25-year return period(flood_extent_rp25)100-year return period(flood_extent_rp100)- Updates metadata fields for the flood extent dataset
- Patches MapCache runtime config to disable symlink/detect blank tile behavior
- Regenerates
mapcache.xmland reloads nginx in the mapcache container - Runs smoke tests for MapServer and MapCache WMS endpoints