Skip to content

Add automated structure impact assessment to flood pipeline#54

Open
cmspeed wants to merge 10 commits into
OPERA-Cal-Val:mainfrom
cmspeed:add-impact
Open

Add automated structure impact assessment to flood pipeline#54
cmspeed wants to merge 10 commits into
OPERA-Cal-Val:mainfrom
cmspeed:add-impact

Conversation

@cmspeed

@cmspeed cmspeed commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

This PR introduces a new automated impact analysis step to the flood pipeline to estimate the number of flooded structures within an Area of Interest (AOI). It evaluates the cumulative maximum flood extent (MAX-EXTENT) against OpenStreetMap (OSM) building footprints using geometric intersection.

Note: To run the impact analysis step the disasters environment must be rebuilt using the updated environment.yml attached to this PR.

Updates

  • A new file,impact.py, adds functions for estimating the impact to OSM structures. This is integrated into run_max_extent_pipeline. The structure impact analysis runs automatically in the background immediately after the maximum flood extent raster is successfully generated.

  • To conserve memory and prevent OSM API timeouts, the script divides the raster into 15x15km (500x500 pixel) windows. It queries the OSM Overpass API for building footprints in chunks that actively contain flooded pixels.

  • The spatial logic guarantees accuracy for buildings smaller than a 30m pixel. It uses all_touched=True to capture any water touching a structure, vectorizes those pixels into Shapely polygons, and calculates the fractional overlap. A building is flagged as impacted if at least 50% of its exact footprint is covered by water.

  • The pipeline automatically outputs two new datasets: a .geojson file containing the impacted building footprints and a .csv containing the impacted building centroids.

  • Updates to environment.yml:
    - Added osmnx to support the new OpenStreetMap building footprint queries.

@cmspeed cmspeed requested a review from ehavazli June 17, 2026 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant