Understanding the InaSAFE Batch Runner

“InaSAFE includes a tool that can run a number of analyses in a batch. In this module we take a closer look.”

In some cases you may wish to run one or more analyses regularly. For example you could have a workflow where your disaster agency produces a standard GIS dataset after each disaster. By replacing the previous dataset but keeping the name the same, you can rerun the InaSAFE after each event, producing one or more reports in a very easy and dynamic way. The tool is used together with the ‘Save Current Scenario’ tool, as we shall see in the exercise below.

You try:

Goal: Understand the InaSAFE batch runner

  • Add the following layers to your map.

1) Flood
2) Population
3) Buildings
4) Roads
5) Wards

  • Make a folder called ‘batch-processing’ to store your scenario profiles.

  • Use the Save Scenario tool (Plugins -> InaSAFE -> Save Scenario) tool to save each of the scenes as listed in the requirements table.

  • Use the batch runner tool (Plugins -> InaSAFE -> Batch Runner) to open the batch-processing directory you created above.

  • Run the scenarios in the Batch Runner.

Check your results:
Look in the batch-processing folder – can you find the results?

More about

More about batch running
The batch runner is able to run a number of scenarios in sequence. This can be very convenient if you want to set up a workflow that expects datasets to follow a standard naming convention. When a new hazard or an updated exposure dataset becomes available, and is placed in the standard location, the batch runner can be used to generate a new report for each scenario automatically.

One thing you should bear in mind is that currently the Batch Runner does not remember which aggregation areas were selected when the scenario is created. For this reason, you should plan your batch running to use an aggregation dataset that is already a subset if needed.

The scenarios file that you create for the batch runner is a simple text file – you can edit this with notepad or gedit or a similar text editor. You may want to do this to edit the title for each scenario (which are by default somewhat generic). Here is an example of a scenario file contents.

[Floods]
exposure = /Users/timlinux/Google Drive/QGISTrainingWorkshop/InaSAFE/exercise-data/worldpop_25.tif
hazard = /Users/timlinux/Google Drive/QGISTrainingWorkshop/InaSAFE/exercise1/tandale_floods.shp
extent = 39.236021, -6.801145, 39.241381, -6.793718
extent_crs = EPSG:4326
aggregation = ../exercise-data/wards.shp

Check your knowledge:

  1. Batch runner is a tool for automating the analysis of a set of scenarios:

    1. True
    2. False
  2. Mark all the correct statements:

    1. There is no preparation needed to use the batch runner.
    2. During the batch process, InaSAFE will prompt you for each layer before it runs.
    3. Batch processing will not recall the current selection when running.

Further reading:

Download the sample data for the lesson.