Unit 16 - Flooding simulation

Beside DTM (see Unit 15 - DTM reprojection) also river streams are required. Such data can be downloaded from OSM database similarly as done in Unit 02 - First steps in the case of Jena city region.


/*added by auto repair*/
/*end of auto repair*/
ogr2ogr -f GPKG jena_rivers.gpkg -a_srs EPSG:4326 -t_srs EPSG:32632 /vsicurl_streaming/"\
%22%3D%22stream%22%5D%3B%29%3B%28%2E%5F%3B%3E%3B%29%3Bout%3B%0A" lines

For simplification data is available from geodata/osm/jena-rivers.gpkg.


Fig. 96 DTM, Jena boundary and rivers provided by OSM.

Flooding can be easily simulated by r.lake module which fills a lake to a target water level from a given start point or seed raster. The resulting raster map contains cells with values representing lake depth (NULL for all other cells beyond the lake).

The r.lake requires seeds coordinates and water level. The coordinates can be set also interactively as Fig. 97 shows.


Fig. 97 Set seed coordinates interactively from map display.

Height of seed point can be determined by querying DTM map layer, see Fig. 98 or directly using r.what module, see example below.

r.what map=dem coordinates=681734,5644423

Fig. 98 Query DTM layer for elevation value.


Before running r.lake let’s start organizing our work! Till now we used PERMANENT mapsets only. There is input data like DTM, Jena city region, cloud mask vector map, Sentinel bands, results of NDVI computation and so on. Data organization can be improved by creating different mapsets. Let’s create a new mapset flooding in the current location jena-region. New mapset can be created by g.mapset (Settings ‣ GRASS working environment ‣ Create new mapset).

Before computation the computation region have to be set, eg. based on dem raster map.

g.region raster=dem
r.lake elevation=dem water_level=150 lake=lake coordinates=681734,5644423

Fig. 99 Flooding simulation on water level 150m, OSM WMS as basemap.


Fig. 100 Flooding similation in 3D view.