Flood Risk Assessment in QGIS

From CUOSGwiki
Jump to navigationJump to search

Introduction

Flood assessment is one of many important purposes for which GIS capabilities can be applied in a practical manner. The scope of the analysis in the tutorial includes a portion of the downtown core of the Ottawa-Gatineau area. This analysis is particularly relevant due to the high number of flooding events and high-rainfall in Ottawa. By completing flood risk assessments, the city can identify at-risk buildings/populations, as well as develop stronger preparedness measures for when a flood does occur.

The purpose of this tutorial is to provide users with an introduction/guidance in completing a flood risk assessment, as well as an introductory glance into QGIS.

Software Requirements

In order to begin this tutorial, a download of the QGIS software is needed. The current version is QGIS 3.2.3 'Bonn' can be found on the QGIS website (https://www.qgis.org/en/site/ ). QGIS is available on Windows, MacOS X, Linux as well as Android.

All steps of the tutorial will be completed using this free and open source software, and will not rely on the use of any other programs.

Data

The primary source of data used for this tutorial can be found in the next section (Downloads) and includes LiDAR data (.tif) for the Ottawa-Gatineau Region in 2014. For the purposes of this analysis, four adjacent elevation tiles will be downloaded, creating a 2x2 grid of raster layers that can be imported directly into QGIS.

Additional data that will be used includes city of Ottawa 1:25,000 Scale Topographic map, which will consist solely of vector data, downloaded as .shp files. In addition to the major waterways, roads and building data, this dataset also provides contours, airports, railroads, etc.; but for the purpose of this tutorial, please use ‘Major_Water.shp’; ‘Roads.shp’; and ‘Buildings.shp’.

  • See next section for instructions on how to download the files.

Downloads

Ottawa-Gatineau Region LiDAR data
https://library.carleton.ca/find/gis/geospatial-data/ottawa-lidar
1. Click on the link
2. Navigate to Layers -> Select 2014 Ottawa LiDAR Index -> Zoom in to the downtown core (as seen in the image below).
3. Download the four tiles centered in the screenshot (Tiles numbered: 365_5031, 366_5031, 365_5030, and 366_5030). The numbers can be seen when the tiles have been selected.
4. Click Direct Download TIF file -> login to your Carleton account -> Extract the files into a single file, where all other files will be stored for the tutorial.
Ottawa 1:25,000 Scale Topographic Map
https://library.carleton.ca/find/gis/geospatial-data/ottawa-125000-scale-topographic-maps/
1. Click on the link
2. Select Direct Download.
3. Extract the folder Map25000' into the same folder as the previous step (keep it in a subfolder)

QGIS Methods and Instructions

Importing and Merging

Step 1.

  • Upload the .tif files into QGIS by navigating through the Browser window.
  • Select the folder where your files are saved, (can be added to favourites by right clicking the folder) and drag in all four .tif files to the main window.
  • The result should be the four raster images together in a square, as pictured below:


Ss4.PNG


Step 2.

  • Use the merge tool (Raster -> Miscellaneous -> Merge) to combine the .tif files into one working layer feature.
  • In the merge tool, select the four .tif files through the Input Layers selection, directly under the Parameters tab.
  • Once the layers have been selected, click Run in Background in order to merge the files.
  • The resulting merged file should look similar to the image below:


Ss5.png


Creating an AOI

Step 3.

  • At this stage an Area of Interest will be created, so we can clip our Ottawa layers in the next step.
  • Navigate to Layers -> Create Layer -> New Shapefile Layer
  • At the top of the window, give a name to your new file (AOI is suitable), and select Polygon as the Geometry Type -> At this point a new layer named AOI will be created.
  • Right click on the newly created AOI layer, and select Toggle Editing. Once this is selected, navigate to the top panel and find the Add Polygon Feature icon (it looks like the green of a golf course).
  • Do your best to draw a border around the Merged layer (hint: use your numpad to move your screen when zoomed in), when complete, right click on the screen and when prompted to save changes to the layer, select Yes.
  • The final step of creating an AOI is to right click on the icon/symbology for the layer, and select border. The final AOI and Merged layer should look similar to what is shown below:


Step 4.

  • Once the four raster images have merged, and the AOI has been created around it, the City of Ottawa files that were downloaded earlier can be added into QGIS.
  • Navigate to the folder they were saved in (same process as importing the .tif files) and drag in the features (vector data) that you want displayed.
  • For the purposes of the tutorial, the polygons used were: Major Water, Buildings, Roads, Major Roads, Railroads, and finally Bridges.
  • Ensure the polygons are overlaying the merged raster layer, and edit the appearance of each feature as you want (double click on the icon to the left of each layer name).
  • The resulting file should appear similar to the image presented below:


Ss8.PNG


Step 5.

  • Now that everything we want is added, the vector layers can be clipped to match the extent of the merged raster layer.
  • Navigate to Vector -> Geoprocessing Tools -> Clip
  • Select the layer you want to be clipped as the Input Layer, and the AOI as the Clip Layer. This clips all parts of the vector layer that is outside the area of the clip layer (the AOI).
  • Repeat this process until all the City of Ottawa vector layers have been clipped, renaming each newly created layer as "name" clip, or by removing the original layer and reassigning the name to the clipped layer.
  • When all the vector layers have been clipped, the result should look similar to this (remember to symbolize everything that has been clipped):


Sink Fill

Step 6.

  • In this step, the Sink Fill (Wang & Liu) was used from the QGIS toolbox. This was used in order to fill any spatial outliers that may have an effect on the overall result of the flood risk assessment.
  • Navigate to Processing at the top of the program, and from there select Toolbox, in order to open the list of available tools.
  • At the bottom of the list of tools is SAGA, select this and continue down until you reach Terrain Analysis - Hydrology -> Fill Sinks (Wang & Liu)
  • Under the dropdown list for DEM select the layer Merged, and select Run (it's also a good idea to save Filled DEM to an Output folder in your primary directory).
  • Upon completion, move your move to the layers area, and move the three new layers (Filled DEM, Flow Directions and Watershed underneath the vector layers.
  • The final output will look the same as the image in Step 5, if everything has gone correctly.


Raster Calculator

Step 5.

  • Raster Calculator is used in this step to establish what areas will be flooded given an increase in water level of 1 meter -- visualized in the example is an increased water level of 1m.
  • Navigate to: Raster - Raster Calculator.
  • Use the Raster Bands and Operators to recreate the following expression: ( ( "Filled DEM@1" <= 56 ) = 1 ) AND ( ( "Filled DEM@!" >= 56 ) = 0 )
  • If entered correctly, Expression Valid will appear under the expression window, and a new new layer will be created.


SS10.PNG

Result

Step 6.

  • Upon completion of the raster calculator, an output of the Ottawa-Gatineau downtown area will be given (same extent we have been working with the entire time).
  • The areas that will be flooded given a rise in water levels of ~ 1 meter are in white (1), while the areas that are untouched remain black (0).
    • Note: The image below has all other layers hidden in order to see the specific area that will be flooded. In order to determine what infrastructure will be affected (and make use of the previous steps), it is important to add all layers back, as seen in the next step.


SS9.PNG


Step 7

  • At this stage the flood analysis is almost complete, but we want to visualize and demonstrate what has been affected by the rising water levels. Simply turn all infrastructure layers back on (i.e. Buildings, Roads).
  • If not visible, move the layers to the top of the Layers tab/window by dragging them above the layer RasterCalcFilled (if not renamed).
  • Finally, make adjustments to the symbology (right-click the layer name, Properties, Symbology) and use something that demonstrates if the infrastructure is flooded or not, such as an outline.
  • The final output should look similar to the image below: