Exercise: Larkana Flood response#

đź”™Back to Homepage

Click here to return to the exercise overview page for module 3

Aim of the exercise:

Participants will work with multiple layers and conduct spatial queries. Additionally, they will learn how to create their own geodata.

Type of trainings exercise:

  • This exercise can be used in online and presence training.

These skills are relevant for

  • QGIS Essentials

  • Working with multiple layers

  • Conduct spatial queries

  • Creation of geodata

Estimated time demand for the exercise.

  • The exercise takes around 3 hours to complete, depending on the number of participants and their familiarity with computer systems.

Context

In 2024, the provinces of Punjab, Sindh, and Balochistan in Pakistan experienced devastating floods due to intense and prolonged rainfall. The following analysis will utilize actual data from this natural disaster. The objective is to pinpoint the specific medical centers and healthcare facilities that were impacted by the flooding. Additionally, we will assess the viability of road access to the city of Larkana throughout the flood period.

Instructions for the trainers#

Trainers Corner

Prepare the training

  • Take the time to familiarise yourself with the exercise and the provided material.

  • Prepare a white-board. It can be either a physical whiteboard, a flip-chart, or a digital whiteboard (e.g. Miro board) where the participants can add their findings and questions.

  • Before starting the exercise, make sure everybody has installed QGIS and has downloaded and unzipped the data folder.

  • Check out How to do trainings? for some general tips on training conduction

Conduct the training

Introduction:

  • Introduce the idea and aim of the exercise.

  • Provide the download link and make sure everybody has unzipped the folder before beginning the tasks.

Follow-along:

  • Show and explain each step yourself at least twice and slow enough so everybody can see what you are doing, and follow along in their own QGIS-project.

  • Make sure that everybody is following along and doing the steps themselves by periodically asking if anybody needs help or if everybody is still following.

  • Be open and patient to every question or problem that might come up. Your participants are essentially multitasking by paying attention to your instructions and orienting themselves in their own QGIS-project.

Wrap up:

  • Leave time for any issues or questions concerning the tasks at the end of the exercise.

  • Leave some time for open questions.

Available Data#

Download all datasets here and save the folder on your computer and unzip the file.

Hint

Reprojected and fixed Flood extend layer can be downloaded here

Dataset name

Original title

Publisher

Download from

PAK_Sindh_adm1.gpkg

Subnational Administrative Boundaries

UN OCHA

HDX

PAK_Sindh_adm2.gpkg

Subnational Administrative Boundaries

UN OCHA

HDX

PAK_Sind_Health_Facilities.gpkg

Pakistan Health Facilities (OpenStreetMap Export)

Humanitarian OpenStreetMap Team (HOT)

HDX

VIIRS_20240721_20240803_MinimumFloodExtent_PAK.shp

Satellite detected water extents from 08 to 12 August 2024 over Pakistan)

UNO SAT

HDX

Roads_Larkana.gpkg

Roads Larkana

Humanitarian OpenStreetMap Team

HOT Export Tool

Hint

Folder structure

To keep your data organized and easily accessible, it’s important to establish a clear folder structure on your computer for your QGIS projects and geodata. Ensure that your exercise data are saved in a location that allows for easy retrieval and association with the corresponding QGIS project.

Task 1: Gain an overview of the situation around Larkana#

../../_images/IFRC-icons-colour_SURGE.png

Context:

You have been deployed as an information manager to the flood-affected regions of Pakistan. Upon your arrival you received reports from the operations team indicating that the city of Larkana and its surrounding areas have been severely affected by the floods. The team needs a general overview of the location of the city.

  1. Open QGIS and create a new project by clicking on Project -> New

  2. Once the project is created save the project in the “project” folder of the exercise “Modul3_Exercise_2_Flood_Larkana”. To do that click on Project -> Save as and navigate to the folder. Name the project “PAK_Larkana_flood_2024”.

  3. First, we want to add the OpenStreetMap as a base map for orientation. To add the OSM as a base map click on Layer -> Add Layer -> Add XYZ Layer…. Choose OpenStreetMap and click Add.

Tip

You cannot interact with a base map!

  1. Next, load the GeoPackage “PAK_Sindh_adm2.gpkg” in your project by drag and drop (Wiki Video). Or click on Layer-> Add Layer-> Add Vector Layer. Click on the three points and navigate to “PAK_Sindh_adm2.gpkg”. Select the file and click Open. Back in QGIS click Add (Wiki Video).

Attention

GeoPackage files can contain multiple files and even entire QGIS projects. When you load such a file in QGIS a window will appear in which you have to select the files you want to load in your QGIS project.

  1. First, we want to export Larkana District and the neighbouring districts Kambar Shahdad Kot, Shikarpur and Sukkur from PAK_adm2_Sindh to have it as a stand-alone vector layer. To do that:

    • Open the attribute table of PAK_adm2_Sindh by right click on the layer -> Open Attribute Table(Wiki Video).

    • Find the row of Larkana and mark it by clicking on the number on the very left-hand side of the attribute table. The row will appear blue and the area of Larkana will turn yellow on the map canvas. You can right-click on the row and click Zoom to Feature(Wiki Video). To select the surrounding districts, click on the Select Feature(s) icon in the QGIS Toolbar, hold the Shift button on your keyboard, and click on the districts either on the map or the attribute table (Wiki Video).

    • After you are done selecting districts, click on the icon to end the feature selection mode.

    • Now right-click on the layer in the Layer Panel and click on Export -> Save Selected Features as. We want to save the selected districts as a GeoPackage, so choose the Format option accordingly. Click on the three points and navigate to your temp folder. Here you can give it the layer the name “Flood_2024_AOI” and click Save. Now you should see the same name in the Layer name field. Click ok(Wiki Video)

    • Click on the icon in the toolbar to end the feature selection.

Achievement:

Now you have an overview of where the district of Larkana is located in Sindh. The operations team can use this information.

Tip

Do not forget to save your project from time to time!

Task 2: Estimation of Flood Impact on the Health Sector in Larkana#

../../_images/IFRC-icons-colour_Health.svg

Context:

Posts on social media have indicated a significant impact on the healthcare system in the region. You have been tasked to find out as much as you can about the situation and, if feasible, to estimate the impact on the health system.

  1. The first thing to do is to find out where the health facilities are located in the area. To do that, you do a quick search on HDX. You find the dataset Pakistan Health Facilities (OpenStreetMap Export). This will do for now.

    • Load the GeoPackage “PAK_Health_Facilities_complete.gpkg” in your project by drag and drop (Wiki Video). Or click on Layer-> Add Layer-> Add Vector Layer. Click on the three points and navigate to “PAK_Sindh_adm2.gpkg”. Select the file and click Open. Back in QGIS click Add (Wiki Video).

    • First, we must extract the health facilities in our area of interest. We will use the tool “Extract by Location” to do that.

    • Open the Processing Toolbox (here is how) and search for the tool.

      • As Input Layer we will use “PAK_Health_Facilities_complete”.

      • For By comparing to the features from we use the layer “Flood_2024_AOI”.

      • As Geometric predicate we use intersect.

      • To save the output click on the three points at Extract (location) -> Save to GeoPackage and navigate to your temp folder. Save the new layer under the name “Health_Facilities_Flood_2024_AOI”. Give the new layer the same Layer name and click Run.

    • Open the Attribute table of the new layer and have a look.

../../_images/PAK_extract_locatio_HS.png

Extract by location Pakistan#

Ok, now we have a good overview of the location of health facilities. We need much better information about the flooded area to identify the health facilities impacted by the flood. Fortunately, the UN has just shared a dataset about the extent of floods. Satellite detected water extents from 08 to 12 August 2024 over Pakistan.

  1. Load the dataset “VIIRS_20240721_20240803_MinimumFloodExtent_PAK.shp” into your QGIS.

  2. Once you have loaded the layers in QGIS, you can see that they are correctly displayed. However, upon checking the layer information, you can see that the new layers have a different Coordinate Reference System (CRS). They have the EPSG Code 9707 whereas our project has 4326 (Wiki Video).

    • Right click on the data layer, click on “Properties”.

    • The “Layer Properties” Window of the data layer will open. Click on “Information”.

    • Under the headline “Coordinate Reference System (CRS)” you find all information about the CRS. The most important are:

    • Name: Here you find the EPSG Code.

    • Unites: Here you can find whether it is possible to use meters with this data layer, degrees or latitude and longitude.

  3. This will be a problem as soon as we do something different then just displaying the layers. Since we want to manipulate the layers in the next step we need to reproject them first (Wiki Video).

    • Click on the Vector tab -> Data Management Tools -> Reproject Layer or search for the tool in the Processing Toolbox.

    • As Input layer select “VIIRS_20240721_20240803_MinimumFloodExtent_PAK.shp”

    • Select as target CRS/ EPSG-Code 4326.

    • Save the new file in your temp folder by clicking on the three dots next to Reprojected, specify the file name as “2024_MinFloodExtend_reprojected”.

    • Click Run

    • Delete the old layer from the layer panel by right click on the layer -> Remove layer.

    • Adjust the opacity of the flood layer by right-clicking on layer “2024_MinFloodExtend_reprojected” in the Layer Panel and click on Properties. A new window will open up with a vertical tab section on the left. Navigate to the Symbology tab. Adjusted the opacity to around 60 % by moving the slider.

We have observed that certain health facilities have been impacted by the flood. In order to visualise this information on the map, we plan to include a new attribute called “affected” in the attribute table of “Health_Facilities_Flood_2024_AOI”. To accomplish this, our first step will involve selecting all the affected health facilities. A new column containing this information is then appended to the “Health_Facilities_Flood_2024_AOI” attribute table.

  1. Open the Processing Toolbox (here is how) and search for the tool “Select by Location”.

    • Select features from = “Health_Facilities_Flood_2024_AOI”.

    • As Geometric predicate we use intersect.

    • For By comparing to the features from we use the layer “2024_MinFloodExtend_reprojected”.

    • Modify current selection by = creating new selection.

    • Click Run.

../../_images/PAK_flood_select_by_location.PNG

Select flood affected health facilities#

Warning

In case you encounter the error:

Feature (1) from “2024_MinFloodExtend_reprojected” has invalid geometry. Please fix the geometry or change the Processing setting to the “Ignore invalid input features” option. Execution failed after 0.07 seconds

You need to first use the tool “Fix Geometry” before repeating the previously failed step 5 of using the tool “Select by Location”.

  • To do so open the Processing Toolbox (here is how) and search for the tool “Fix Geometries”.

  • Input layer = 2024_MinFloodExtend_reprojected

  • Save the new file in your temp folder by clicking on the three dots , specify the file name as “2024_MinFloodExtend_reprojected_fix”.

  • Click Run.

../../_images/PAK_flood_ngeomertrie_error.PNG

Fix Geometry#

  1. Open the attribute table of “Health_Facilities_Flood_2024_AOI” by right click on the layer -> Open Attribute Table(Wiki Video) and activate the editing mode by clicking on (Wiki Video). Now you are able to edit the data directly in the table.

  2. First, we add a new column with the name “Flood_affected”. To do so, click on . In the Add field window, you have to add the name and set the Type to Text(string). Click OK (Wiki Video)

../../_images/PAK_flood_new_column.PNG

Add new column#

  1. Now look for the Show all Features option in the lower left corner and click on it. Then, select the option Show selected features (Wiki Video). This will filter the table to display only the rows that represent the health facilities directly impacted by the flood. Now, you can write Yes in the “Flood_affected” column.

  • When you are done, click to save your edits and switch off the editing mode by again clicking on (Wiki Video).

  • Click on the icon in the toolbar to end the feature selection.

  1. To visualise the enriched data set, we use the function “Categorized Classification” function. This means that we select a column from the attribute table and use the content as categories to sort and display the data (Wiki Video).

    • Right-click on the layer “Health_Facilities_Flood_2024_AOI” in the Layer Panel and click on Properties. A new window will open up with a vertical tab section on the left. Navigate to the Symbology tab.

    • On the top you find a dropdown menu. Open it and choose Categorized. Under Value select “Flood_affacted”.

    • Further down the window, click on Classify. Now you should see all unique values or attributes of the selected “Flood_affacted” column. You can adjust the colours by double-clicking on each colour in the central field. Once you are done, click Apply and OK to close the symbology window.

../../_images/en_qgis_categorized_classification_Pakistan_flood_exercise.png

Flood affected health facilities classification#

Achievement:

We’ve pinpointed the specific health facilities that have been inundated by the floods. Our findings indicate that a total of four facilities have been completely flooded and are currently non-operational. Considering we assessed the minimum flood impact, it’s highly probable that more health facilities will also be impacted. This data is crucial for our operational team as it will enable them to strategize and execute an effective response.

Task 3: Logistical access to Larkana City#

../../_images/IFRC-icons-colour_Logistics.svg

Context:

The operations team is making plans to deliver much-needed supplies to the affected region around Larkana. Currently, there is uncertainty about how the supplies can be transported there. The operations team has asked for more information on this topic.

They need answers to the following three questions:

  • Which roads leading into Larkana are blocked, and at what specific locations are they blocked?

  • Are there any bridges that can be crossed from the eastern side of the Indus to the western side, and where are these bridges located?

  • If transporting supplies by road into the region is not feasible, what alternative method could be used to deliver the supplies?

In order to get a clearer picture, we need to import the road network data for the region into QGIS. Look for the file in the input folder. The road network is initially displayed without showing any road types or other relevant details. We should apply a categorized classification technique only to display the specific roads that we are interested in.

  1. Load the dataset “Roads_Larkana.gpkg” from your input folder into your QGIS.

  2. For categorized classification right-click on the layer “Roads_Larkana” in the Layer Panel and click on Properties. A new window will open up with a vertical tab section on the left. Navigate to the Symbology tab (Wiki Video).

    • On the top you find a dropdown menu. Open it and choose Categorized. Under Value select “highway”.

    • Further down the window, click on Classify. Now you should see all unique values or attributes of the selected “Flood_affacted” column. You can adjust the colours by double-clicking on the coluors in each row in the central field.

    • Remove the tick from all categories except: motorway, primary, secondary, trunk

    ../../_images/PAK_road_classification.PNG

    Pakistan road classification#

    • You have the option to customize the width of the main roads’ lines to improve the visualization. Open the Symbology window, then select Symbol. In the new window, you can adjust the width of the lines to your preference.

    ../../_images/PAK_road_symbol_weight.png

    Pakistan road classification#

    • Once you are done, click Apply and OK to close the symbology window.

  3. To simplify the process, we will visually search for blocked roads and mark them with points. For this purpose, we will create an entirely new point dataset representing blocked roads.

    • Click on Layer –> Create Layer -> New GeoPackage Layer(Wiki Video)

    • Under Database click on and navigate to temp folder. Give the new dataset the name “PAK_flood_2024_blocked_road”. Click Save.

    • Geometry type: Select Point

    • Under Additional dimension you should always make sure that you check None.

    • Select the coordinate reference system (CRS) “EPSG:4326-WGS 84”. By default, QGIS selects the project CRS.

    • Under New Field you can add columns to the new layer. Add the column “Blocked_road”.

      • Name = “Blocked_road”

      • Type: Select Text Data

      • Click on Add to Fields List to add the new column to the Fields List.

      • Create another field with the name “Blocked_bridge” and the Type: Select Text Data.

      • Click OK.

    • Your new layer will appear in the Layer Panel

    ../../_images/PAK_blocked_road_new_layer.png

    New layer blocked roads#

  4. Now you can create a point for each place where the flood layer covers the main roads leading out of Larkana wiki. Currently the new layer “PAK_flood_2024_blocked_road” is empty. To add features we can use the Digitizing Toolbar. If you cannot see the toolbar, click on the tab View -> Toolbars and check Digitizing Toolbar (Wiki Video).

    • Activate the editing mode by clicking on . Activate then the option to add new points by clicking on .

    • Look out for places where the flood layer covers the main roads or bridges leading out of Larkana. Once you have found one, left-click on the location you want to digitise.

    • Once you click on a place, a window will appear. Indicate that the road is blocked by writing Yes in the field Blocked_road.

    • Repeat this step with all the locations your can find.

    ../../_images/PAK_blocked_road_digitalise.png
    • Once you are done with digitizing click on to save your edits.

    • Click again on to end the editing mode.

  5. Now, we have mapped all blocked main access roads into Larkana. We can use icons instead of just points to display the layer “PAK_flood_2024_blocked_road” to visualise this fact better wiki.

    • Right-click on the layer “PAK_flood_2024_blocked_road” in the Layer Panel and click on Properties. A new window will open up with a vertical tab section on the left. Navigate to the Symbology tab.

    • Keep the Single Symbol option. Select any symbol from the list that is appropriate for marking blocked roads.

    • Once you are done, click Apply and OK to close the symbology window.

    • After you are done, click on the icon to end the feature selection mode.

    ../../_images/PAK_blocked_road_symbol.png

    Visulsing blocked roads with icons#

Part of your assignment was to point out possible alternatives to road transport. Can you identify any?

Answer

In the south-west of Larkan City, you can find the Mohenjodaro Airport. Currently, the road from Larkana City to the airport appears to be open and accessible. This means that essential supplies could potentially be transported from the airport into the city without encountering any roadblocks.

../../_images/PAK_road_access_airport.png

Road access to Mohenjodaro Airport#

The operations team has now all the information they need to plan their logistics. Good Job!