QGIS Trigger Workflow for Madagascar#

The QGIS workflow presented in this article was developed in the framework of the Forecast-based-Action (FbF) Project of the Croix-Rouge Malagasy (CRM), the German Red Cross (GRC) and the Heidelberg Institute for Geoinformation Technology (HeiGIT).

The workflow is almost fully automated through a QGIS model, requiring no manual intervention. The chapter Automated Trigger Workflow outlines the process and its practical implementation. Each step included in the model is explained in detail to provide a complete understanding of the workflow and how the analysis was carried out.

Background#

Setting triggers is one of the cornerstones of the Forecast-based Financing system. For a National Society to have access to automatically released funding for their early actions, their Early Action Protocol needs to clearly define where and when funds will be allocated, and assistance will be provided. In FbF, this is decided according to specific threshold values, so-called triggers, based on weather and climate forecasts, which are defined for each region (see FbF Manual).

Trigger Statement#

Pre-Activation Trigger: at least one of the meteorological forecasts from Meteo Madagascar, RMSC La Reunion, or ECMWF projects a greater than 50% likelihood of landfall by a tropical cyclone of tropical storm strength or higher within the next 7 days.

Activation Trigger: if the Meteo Madagascar (DGM) forecast indicates landfall of a tropical cyclone with wind speeds in excess of 118 km/h within the next 48-72 hours.

Functionality of the Trigger Workflow#

The Trigger Process concept is displayed in the following figure.

../../_images/MAD_Trigger_concept.png

The entire trigger workflow will be run in a QGIS model, which automates the spatial analysis for assessing the impact of tropical cyclones. It integrates cyclone storm track data with administrative boundaries, population data, infrastructure, and service locations to identify and quantify affected areas and resources.

Trigger Input Data#

For the trigger mechanism to work properly we currently use different datasets: data that we assume to be fixed in the near term, and variable data which describe the datasets that will be checked for triggering on a regular basis depending on the occurrence of anticipated cyclone events.

Fixed Data#

By fixed data we mean datasets that are needed for the trigger to work, that will most probably not change in the near term. In the long term these datasets can be adapted easily.

Dataset

Source

Description

Administrative Boundaries

HDX

The administrative boundaries on level 0-4 for Madagascar can be accessed via HDX provided by OCHA. For this trigger mechanism we provide the administrative boundaries on level 1 (regional level) and 2 (district level) as a shapefile.

Population Counts

WorldPop

The worldpop dataset in .geotif raster format provides the estimated total number of people per grid-cell for the year 2020. We will be working with the Constrained Individual countries 2020 at a resolution of 100m.

Buildings Counts

Global ML Building Footprints

The building counts dataset in .geotif raster format counts the number of buildings per 100m grid cell. The workflow on how this dataset was created can be found in this GitLab repo

Land Cover

Copernicus Land Cover

The land cover dataset in .geotif raster format provides an overview over the dominant land cover type at a resolution of 100m. This dataset was downloaded using the Google Earth Engine. The workflow on how this dataset was downloaded can be found in this GitLab repo

Master Raster

The three raster datasets are joined together in a Master Raster which will be a raster layer with three channels and a resolution of 100 m. It will include the following information:

  1. Population counts from Worldpop constrained (2020)

  2. Building counts derived from ML Building Footprints (2021)

  3. Land Cover derived from Copernicus Land Cover (2019)

Monitoring Data#

The cyclone trigger mechanism is based on the data provided by NOAA (National Centers for Environmental Information). The cyclone storm tracks are provided within the International Best Track Archive for Climate Stewardship (IBTrACS) project. It is the most complete global collection of tropical cyclones available and merges recent and historical tropical cyclone data from multiple agencies to create a unified, publicly available, best-track dataset. IBTrACS was developed collaboratively with all the World Meteorological Organization (WMO) Regional Specialized Meteorological Centres, as well as other organizations and individuals from around the world.

Tropical cyclone track data is available in various subsets, depending on the temporal scale of interest. Regional subsets can also be generated, with data for the South Indian Ocean being particularly relevant for this trigger mechanism.

Automated Trigger Workflow#

As explained at the start of this chapter the developed trigger workflow is done automatically by a QGIS model. In this chapter we will explain its functionality and in a subsequent step it is explained how to run the automated model.

Functionality of the model#

The following key processing steps are run inside the model:

  1. Cyclone Buffering & Impact Area Extraction The new cyclone track is buffered to create a zone of potential impact. This buffer is dissolved to form a single affected area polygon. The resulting layer is the output cyclone area, used throughout the rest of the model.

  2. Administrative Units Affected Admin 2 (district-level) polygons are intersected with the cyclone buffer to extract the Affected districts. Admin 1 (region-level) boundaries are also extracted and used to identify neighboring regions that may still be at risk.

  3. Population Impact Zonal statistics are used to calculate the total affected population within the cyclone area. The result is saved as Affected Population and exported to a spreadsheet.

  4. Infrastructure Impact The model intersects the cyclone area with:

  • Building data to count number of affected buildings.

  • POIs (Points of interest) to identify affected education facilities and health site infrastructure. The results are exported as:

  • Affected Buildings

  • Affected POIs Table, including a count of impacted education and health sites.

  1. Warehouse Accessibility Using the affected regions and buffered road data, the model identifies:

  • Relevant Technicians

  • Warehouses within reach of the affected area. The output layer is relevant warehouses, indicating logistical support readiness.

How to run the model#

The QGIS Model Designer is a visual tool that allows users to create and edit a workflow with all tools available in QGIS that can be used repeatedly in a simple and time-efficient manner. It provides a graphical interface to build workflows by connecting geoprocessing tools and algorithms. The user can define inputs, outputs, and the flow of data between different processing steps.

Step 1: Setting up folder structure !!NEEDS TO BE FIXED!!#

../../_images/Drought_EAP_Worklow_Step_1_1.png

Purpose: In this step we set up the correct folder structure to make the analysis easier and to ensure consistent results.

Tool: No special tools or programs are needed

Instruction

Folder Structure

  1. Open the Folder “FbF_Cyclone_Monitoring_Trigger”

  2. Open the subfolder “AA_Madagascar”

  3. Copy the Template folder “TEMPLATE_Year_Month” and change the name to the current year and month. The result could be the folder “2022_05”

../../_images/Folder_structure_FbF_Drought_Monitoring_Trigger.drawio.svg

The Video below shows the process for setting up the folder for december 2023.

Step 2: Download of the storm track data#

The International Best Track Archive for Climate Stewardship (IBTrACS) v04r01 data is updated three times a week (usually on Sunday, Tuesday, and Thursday), and could be updated more frequently to address specific needs and use cases. The latest updates in the correct file format can be found on their website:

  1. Look for the Access Methods section and click on Shapefiles. The link leads to the following website which can also be seen in the figure below.

  2. Since we don’t need storm track data for the entire world or the full archive, we will download only a relevant subset. Locate for the file named IBTrACS.ACTIVE.list.v04r01.lines.zip and click on it - the download should begin automatically.

  3. Unzip the file and open it in QGIS.

  4. Open the attribute table and delete all the storm tracks that are not relevant for this analysis. Safe the updated storm track file.

Note

The storm track subset IBTrACS.ACTIVE.list.v04r01.lines.zip contains all storms active in the last 7 days. If more comprehensive data is needed, it is advisable to download a subset by basin. For Madagascar, the most relevant region is SI – South Indian, which includes our Area of Interest. This dataset can be downloaded from the same website under the name IBTrACS.SI.list.v04r01.lines.zip.

../../_images/MAD_Trigger_stromtrack_download.PNG

Step 3: Open the project in QGIS and load the model in the QGIS Model Designer#

In this step we will open our Trigger project in QGIS and load the QGIS model which will automatically run the analysis for us.

  1. Open the file Trigger_Model.qgz by double clicking it.

  2. The file will open and you will lots of data pre-loaded. This data is required for running the QGIS model.

  3. Now open the QGIS Model Designer. The tool can be accessed under Processing -> Modeler Designer

  4. In the upper panel click Model -> Open Model and navigate to your folder “FbF_Cyclone_Monitoring_Trigger”, mark the “Cyclones_EAP_MAD_Trigger.model3” file an click on Open. The model will open and you will see yellow, white, green and grey boxes.

Box

Significance

Description

Yellow

Model Input

Definition of the input data for the model the model will perform on.

White

Algorithms

Algorithms or Tools are specific geoprocessing steps that perform specific tasks, such as clipping, reprojecting or buffering.

Green

Model Output

The results created by the model (Output layers) are automatically added to your layers panel in your QGIS project interface.

Grey

Comments

The boxes are used to further explain the specific processes.

Step 4: Run the model !!NAMES IN THIS SECTION NEED TO BE FINALIZED!!#

../../_images/Drought_EAP_Worklow_Step_5_1_automated_model.png

Model Input & Output

Attention

In the dropdown list, only layers that are currently loaded in your QGIS Project will be displayed.

For each of these mandatory inputs, you click on the dropdown arrow and choose the respective file.

  1. In the upper panel click on Model -> Run Model. A new window will open where you need to define the model input and output.

  2. The model needs the following 7 inputs:

    1. mdg_admbnda_adm1_BNGRC_OCHA_20181031: ADM1

    2. ADM2_RISK: ADM2 & Risk

    3. Isochrones: CRM warehouse isochrones

    4. 20240108_MAD_CRM_Warehouses_updated: CRM warehouses

    5. IBTrACS.ACTIVE.list.v04r01.lines: Cyclone Tracks

    6. hotosm_master_poi: Master_POI

    7. MAD_pop_constrained_buildings_landcover: Master Raster

THIS ENTIRE LIST NEEDS UPDATED NAMES

  1. Further down, you have to specify where to save the output:

    1. Trigger_activation: Click on the three points -> Save to File and navigate to Resultsfolder in the folder you created in step 1 (Year_month). Give the output the name:

    Trigger_activation
    
    1. Indices: Click on the three points -> Save to File and navigate to Resultsfolder in the folder you created in step 1 (Year_month). Give the output the name:

    Indices
    
    1. IPC_Phase_C:Click on the three points -> Save to File and navigate to Resultsfolder in the folder you created in step 1 (Year_month). Give the output the name:

    IPC_Phase_C
    
    1. IPC_Phase_P:Click on the three points -> Save to File and navigate to Resultsfolder in the folder you created in step 1 (Year_month). Give the output the name:

    IPC_Phase_P
    
  2. Click Run. Your results layer will appear in the main QGIS window. You can close the graphical modeller window.

Video: Input and output Model

../../_images/SRCS_Model_input.png

Step 5: Visualisation of results#

We will generate two output maps to support the analysis:

  • Map 1 will provide an overview of the affected districts, the extent of the cyclone event, and the locations of relevant warehouses.

  • Map 2 will focus on the impact to infrastructure and population, displaying the number of affected people, buildings, health sites, and education facilities.

Additionally, a map showing the warehouse isochrones for all 13 warehouses will be provided by HeiGIT.

../../_images/Drought_EAP_Worklow_Step_14_1.png

Purpose: Definition of how features are represented visually on the map.

Tool: Symbology tab

Cyclone Impact Area with Affected Districts and Warehouse Locations

  1. Right click on the “Affected_districts” layer -> Properties -> Symbology

  2. In the down left corner click on Style -> Load Style

  3. In the new window click on the three points . Navigate to the “FbF_Cyclone_Monitoring_Trigger/layer_styles” folder and select the file “affected_districts_style.qml”.

  4. Click Open. Then click on Load Style

  5. Back in the “Layer Properties” Window click Apply and OK

Do this same process for the following outputs:

  • relevant warehouses

  • the input storm track

  • and the output cyclone area

Output after styling the layer

You will now see affected districts and the relevant warehouses clearly visible. The outline of the input storm track can also be seen on the map.

../../_images/Map_yes_trigger.PNG

Cyclone Impact on Population and Infrastructure

  1. Right click on the “risk_assessment_districts” layer -> Properties -> Symbology

  2. In the down left corner click on Style -> Load Style

  3. In the new window click on the three points . Navigate to the “FbF_Drought_Monitoring_Trigger/layer_styles” folder and select the file “somalia_risk_assessment_style.qml” style layer.

  4. Move the “risk_assessment_district” layer below “Trigger_Activation” layer (Layer Concept).

  5. Back in the “Layer Properties” Window click Apply and OK

Info: Risk Assessment Layer

For the creation of an Intervention Map we will have to add the risk assessment data and the respective style file. For this first of all load from “FbF_Drought_Monitoring_Trigger/Fixed_data/Risk_Assessment” the file “risk_assessment_districts.gpkg”. This file is the output of the conducted risk assessment and contains a risk value for each district of Somaliland and Somalia. In order to visualize it

Administrative 2 Boundaries (Regions)

  1. Right click on the “Som_Admbnda_Adm1_UNDP” (Regiond) layer -> Properties -> Symbology

  2. In the down left corner click on Style -> Load Style

  3. In the new window click on the three points . Navigate to the “FbF_Drought_Monitoring_Trigger/layer_styles” folder and select the file “somalia_risk_assessment_style.qml”.

  4. Click Open. Then click on Load Style

  5. Back in the “Layer Properties” Window click Apply and OK

  6. Add a the OpenStreetMap basemap by clicking on Layer -> Add Layer -> Add XYZ layer... -> Select the OpenStreetMap. Click Add. (Wiki basemap)

  7. Place the OpenStreetMap basemap on the bottom.

  8. Delet all layers exept:

    • Trigger_activation

    • risk_assessment_districts

    • Som_Admbnda_Adm1_UNDP

    • OpenStreetMap

Video: Visualisation of results

Intervention Map without Trigger activation

Intervention Map with Trigger activation

../../_images/Map_no_trigger.PNG
../../_images/Map_yes_trigger.PNG

Attention

Remember the layer concept and make sure the basemap layer is at the bottom of your layers panel.

Step 6: Making the Print Map#

../../_images/Drought_EAP_Worklow_Step_15_1.png

Purpose: Viualisation of the map features in a printable map layout

Tool: Print Layout

  1. If not done before, delet all layers expect Trigger_activation, risk_assessment_districts and OpenStreetMap

  2. Open a new print layout by clicking on Project -> New Print Layout -> enter the name of your current Project e.g “2022_04”.

  3. Go the the FbF_Drought_Monitoring_Triggerfolder and drag and drop the fileTrigger_activation_Intervention_map.qpt` in the print layout

  4. Change the date to the current date by clicking on “Further map info…” in the items panel. Click on the Item Properties tab and scroll down. Here you can change the date in the Main Properties field.

  5. Adjust the Lgend by clicking on the legend in the Item Properties tab and scroll down until you see the Legend items field. If it is not there check if you have to open the dropdown. Make sure Auto update is not checked.

    • Remove all itemes in the legend be clicking on the item and then on the red minus icon below.

    • Add Trigger_activation and risk_assessment_districts to the legend by clicking on the green plus and click on the layer and click ok

Video: Making print map

Attention

Make sure you edit the Map Information on the template, e.g. current date. Also make sure to check the legend items: Remove unnecessary items and eventually change the names to meaning descriptions.

In order to easily visualize the output of the trigger analysis we provide you with a map template that can be used as a base for your visualization. You can find the template in the following directory: “…/FbF_Drought_Monitoring_Trigger/maps_somalia_template_risk_assessment.qpt”.

You can also adapt the template to your needs and preferences. You can find help here.

Attention

Make sure you edit the Map Information on the template, e.g. current date. Also make sure to check the legend items: Remove unnecessary items and eventually change the names to meaning descriptions.

Step 7: Exporting the Map#

../../_images/Drought_EAP_Worklow_Step_16_1.png

Purpose: Export the designed and finalized map layout in order tp print it as a pdf or format of your choice.

Tool: Print Layout

When you have finished the design of you map you can export it as pdf or image file in different datafromats.

Export as Image

  1. In the print layout click on Layer -> Export as Image

  2. Chose the Result folder in the folder you have created in step 1. Give the file the name of the project e.g 2022_04

  3. Click on Save

  4. The window “Image Export Options” will appear. Click Save Now the image can be found in the result folder in the folder you created in Step 1

Export as PDF

  1. In the print layout click on Layer -> Export as PDF

  2. Chose the Result folder in the folder you have created in step 1. Give the file the name of the project e.g 2022_04

  3. Click on Save

  4. The window “PDF Export Options” will appear. For the best results, select the lossless image compression.

  5. Click Save Now the image can be found in the result folder in the folder you created in Step 1

Video: Export image and PDF

../../_images/map_output_example2.png