Unit 16 - Flooding simulation

Beside DEM (see Unit 15 - Reprojection) it would be nice to have also river streams available. We can download this data from OSM database similarly as we did in Unit 02 - First steps in the case of Jena city region.

Note

[bbox:50.85374080,11.50084754,50.98991003,11.67463202];
(
way
["waterway"="river"];
way
["waterway"="stream"]
);
/*added by auto repair*/
(._;>;);
/*end of auto repair*/
out;
ogr2ogr -f GPKG jena_rivers.gpkg -a_srs EPSG:4326 -t_srs EPSG:32632 /vsicurl_streaming/"\
http://overpass-api.de/api/interpreter?data=%5Bbbox%3A50%2E85374080%2C11%2E50084754%2C50%2\
E98991003%2C11%2E67463202%5D%3B%28way%5B%22waterway%22%3D%22river%22%5D%3Bway%5B%22waterway\
%22%3D%22stream%22%5D%3B%29%3B%28%2E%5F%3B%3E%3B%29%3Bout%3B%0A" lines

For simplification you can find this data in sample dataset (download 7z-archive): osm/jena-rivers.gpkg.

../_images/jena-rivers.png

Fig. 94 DEM, 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. 95 shows.

../_images/r-lake-coords.svg

Fig. 95 Set seed coordinates interactively from map display.

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

r.what map=dem coordinates=681734,5644423
../_images/dem-what.svg

Fig. 96 Query DEM layer for height value.

Important

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

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

g.region raster=dem
r.lake elevation=dem water_level=150 lake=lake coordinates=681734,5644423
../_images/r-lake-150.png

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

../_images/r-lake-150-3d.png

Fig. 98 Flooding similation in 3D view.