“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.
Goal: Understand the InaSAFE batch runner
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 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
Batch runner is a tool for automating the analysis of a set of scenarios:
Mark all the correct statements:
Download the sample data for the lesson.