Back to prompt library
Build a Coastal Flood Inundation STAC DEM Evaluator — implementation
Linked challenge: Build a Coastal Flood Inundation STAC DEM Evaluator
Prompt source
implementation75 lines11 sectionsNo variables1 code block
## Build
Assess coastal commercial assets against digital elevation models retrieved from STAC catalogs. Model simulated storm surge water level scenarios to calculate structural ground-floor inundation exposure.
## User
Coastal Vulnerability Engineer
## Workflow
1. Parse building perimeter footprints and recorded ground-floor elevations.
2. Retrieve high-resolution DEM raster assets using STAC Item bounding boxes.
3. Simulate storm surge inundation depths across multiple water level scenarios.
4. Compile an asset vulnerability schedule detailing expected inundation depth.
## Interface
Browser-based map interface highlighting building footprints colored by depth of water under chosen surge heights.
## Data
Query public USGS 3DEP elevation STAC items or host mock elevation GeoTIFFs alongside STAC Item JSON files.
Starter examples below are synthetic. They are not downloaded records.
## Source
[STAC specification](https://raw.githubusercontent.com/radiantearth/stac-spec/master/README.md)
Accesses STAC Collection and Item specifications for lidar-derived digital elevation models (DEM) assets.
## Tools
langgraph, rasterio, geopandas.
LangGraph manages stateful cyclic evaluation across multiple storm surge height scenarios and asset batches.
OpenAPI-compatible endpoint or hosted model for generating natural language engineering mitigation summaries.
## Deliverables
Submit runnable source, pinned dependencies, setup commands, a working interface, example outputs, and a recorded end-to-end demo. Include tests and an action log.
## Acceptance
- Correctly extracts minimum elevation values inside building footprint boundaries.
- Computes flood inundation depth as surge water level minus ground elevation.
- Flags structures where inundation depth exceeds zero for a 2-meter surge event.
## Starter Examples
```json
[
{
"input": {
"_record_type": "simplified synthetic app record",
"building_id": "BLD-MIAMI-101",
"stac_dem_item_id": "USGS-3DEP-DEM-01",
"base_elevation_m": 1.4,
"first_floor_height_m": 0.5,
"simulated_surge_levels_m": [
1,
2,
3
]
},
"expected_output": {
"building_id": "BLD-MIAMI-101",
"ground_inundation_at_2m": 0.6,
"first_floor_breached_at_2m": true,
"vulnerability_tier": "HIGH"
}
},
{
"input": {
"_record_type": "simplified synthetic app record",
"building_id": "BLD-MIAMI-102",
"stac_dem_item_id": "USGS-3DEP-DEM-02",
"base_elevation_m": 3.8,
"first_floor_height_m": 0.5,
"simulated_surge_levels_m": [
1,
2,
3
]
},
"expected_output": {
"building_id": "BLD-MIAMI-102",
"ground_inundation_at_2m": 0,
"first_floor_breached_at_2m": false,
"vulnerability_tier": "MINIMAL"
}
}
]
```
## Safety
Simulation results are indicative risk indicators and must not supersede official FEMA Flood Insurance Rate Maps (FIRMs).
Use mock external writes. Require human review before any real deployment.