|
[The scientific documentation can be found here.](Scientific_documentation)
|
|
This program extracts maximal flood area from GIS layers containing the maximum simulated flood depth during an event, intersects these with building and street features and computes flood damage based on damage functions for residential and commercial buildings as well as streets and green areas.
|
|
|
|
|
|
|
|
[The scientific documentation can be found here.](Scientific_documentation)
|
|
|
|
|
|
[The user documentation can be found here.](User_documentation)
|
|
[The user documentation can be found here.](User_documentation)
|
|
|
|
|
|
|
|
|
|
# Introduction
|
|
|
|
This program extracts maximal flood area from a MIKE 21 dfsu file, intersects these with building and street features and computes flood damage based on damage functions for residential and commercial buildings as well as streets.
|
|
|
|
|
|
|
|
# Parameters
|
|
|
|
* simpath - path to main simulation directory
|
|
|
|
* simdir - name of simulation subdirectory in simpath, we expect the M21 simulation results to exist as `os.path.join(simpath,simdir,'Results.dfsu')`
|
|
|
|
* dancedb - path to spatiallite database in DynaMind format containing building and street layers
|
|
|
|
* demsize - resolution of the elevation model used for simulation in m, used for determining buffer size when intersection flood area and buildings
|
|
|
|
* resolution - grid resolution used for the damage analysis, 5m seems like a good compromise
|
|
|
|
* workpath - path to local working directory, the script creates temporary files in this directory
|
|
|
|
|
|
|
|
# Input Data
|
|
|
|
* p_catchhull - shapefile containing boundary of the catchment to consider, all input data are clipped to this region
|
|
|
|
* p_damagefile - text file containing damage functions to be applied
|
|
|
|
* pathin - dfsu result file containing max flood area as item 1
|
|
|
|
* dancedb - spatiallite database containing layers 'building' and 'street'. Layer 'building' must contain information on building types in field 'use_type'. See function separate_building_types in helper_damage.py for details.
|
|
|
|
|
|
|
|
# Output
|
|
|
|
The computed damage is written to a text file pparfile, which is assumed existing in a defined format. This part of the code needs to be changed for other applications.
|
|
|
|
|
|
|
|
# Method
|
|
|
|
Buildings are divided into residential and commercial buildings. All buildings, streets and flood area are subsequently converted to separate raster layers with resolution **_resolution_**. For the buildings, we assign a unique integer ID before this conversion, which is then used as the raster value in the building raster.
|
|
|
|
The rasters created for buildings, streets and flood area all have the same resolution and extent.
|
|
|
|
|
|
|
|
## Analysis for buildings
|
|
|
|
As buildings are "holes" inside the simulated flood areas, we buffer the flood areas "into" the buildings by applying a neighborhood maximum filter to those flood raster cells that are located inside buildings. The filter edge length is determined as (in cells) `(floor(float(demsize)/float(resolution)/2)+1)*2`.
|
|
|
|
We then
|
|
|
|
1. select all building cells that are located in flooded areas - these are the flooded buildings,
|
|
|
|
2. for each of the flooded buildings, find the cells in the flood raster that overlap it,
|
|
|
|
3. extract the maximal water level for those cells and save it in a list together with the ID of the building, and
|
|
|
|
4. compute the flood damage for each building based on the maximal water level and the applicable damage function for this building type.
|
|
|
|
The first step may seem unneccessary, but very much helps to reduce computation time and memory consumption as it limits the amount of buildings to consider in the following steps.
|
|
|
|
|
|
|
|
## Analysis for streets
|
|
|
|
Here the analysis is easy, as we we only need to find the number of raster cells, where the water depth is greater than the flooding threshold for streets (0.3m) and where the street raster indicates that the cell belongs to a street. |
|
|
|
\ No newline at end of file |
|
|