The Impact Layer Merge Tool

In some cases you may wish to create a report containing the combined output of two impact functions for the same area for the same hazard but different exposures. For example, you may carry out an assessment of the impact of a flood on population and on buildings and combine the results into a single report. The Impact Layer Merge tool allows you to do this.

Opened impact merge dialog

Opened impact merge dialog

Prerequisites

In order to use this tool, please bear in mind the following requirements:

  • Both impact layers should be loaded in your current project

  • Both impact layers should have been created for the same geographic region

  • The same aggregation area should be used for both assessments

Procedure

To use this tool, follow this procedure:

  • Run an impact assessment for an area using aggregation. such as flood impact on buildings aggregated by municipal boundaries.

  • Run a second impact assessment for the same area using the same aggregation. e.g. flood impact on people aggregated by municipal boundaries.

  • Open the Impact Merge tool and select each impact layer from the pick lists provided.

  • Select the aggregation layer that was used to generate the first and second impact layer.

  • Select an output directory.

  • Check the box next to Use customized report template and select the report template file if you want to use your own template. Note that all the map composer components that are needed must be completed.

  • Click OK to generate the per aggregation area combined summaries.

Generated outputs

The tool will generate a PDF per aggregation area. The PDFs will be placed in the designated output directory after completion of the merge process. The output will consist of a map page and a table page. These are illustrated below:

Impact merge report - map page

Map page generated by the impact merge tool

Impact merge report - table page

Table page generated by the impact merge tool

In the case of impact assessments where no aggregation has been used, only a single PDF report is generated. In the case of impact assessments where aggregation has been used, one PDF is generated per aggregation area.

Note

After report generation completes, the output directory will be opened automatically.

Using customised templates

The default template report is located in /resources/qgis-composer-templates/merged-report.qpt. If that template does not satisfy your needs, you can use your own report template. Before using your own report template, make sure that your template contains all of these elements with id:

  • impact-map, a QgsComposerMap

  • safe-logo, a QgsComposerPicture

  • summary-report, a QgsComposerLabel

  • aggregation-area, a QgsComposerLabel

  • map-scale, a QgsComposerScaleBar

  • map-legend, a QgsComposerLegend

  • organisation-logo, a QgsComposerPicture

  • merged-report-table, a QgsComposerHTML

If any of those elements does not exist on the report template, the tools will tell you what element is missing on the template.

Note

You can arrange those elements in any position you want.

Map template elements

In terms of value replacement, there are three groups of elements on the template:

1. Elements that can be changed with the InaSAFE Options tool. To change the value of these elements, please go to InaSAFE Options and change the value of the related field. Those elements are:

  • organisation-logo. It corresponds to the Organisation logo field in InaSAFE Options. If you do not fill this field, then the default one, supporters.png, will be used.

  • disclaimer. This corresponds to the Disclaimer text field in InaSAFE Options. If you do not fill in this field the default text will be used: “InaSAFE has been jointly developed by Indonesian Government-BPNB, Australian Govenment-AIFDR and the World Bank-GFDRR. These agencies and the individual software developers of InaSAFE take no responsibility for the correctness of outputs from InaSAFE or decisions derived as a consequence.”

2. Elements containing tokens. The id of these elements is not significant, only the token it contains. At render time, these tokens will be replaced. If you want to have a label containing the value of these elements, enclose these elements with [] on a label i.e [impact-title] or [hazard-title]. The elements are listed below:

  • impact-title - indicates the title of two impacts. The value will be “first_impact_title and second_impact_title

  • hazard-title - indicates the hazard title used to generate the impact layer.

3. Elements that are direcly updated by the renderer. All of these elements below are generated automatically by the tools.

  • impact-map. This contains the map of two impact layers.

  • summary-report. This contains the summary of the impact from two impact layers.

  • aggregation-area. This contains the name of the aggregation area.

  • map-scale. This indicates the scale of the map. To work with any layer projection preferences, we encourage you to use a numeric scale bar.

  • map-legend. This shows the legend of merged impact layers. The map legend on default template is set to have 2 columns showing each impact layer legend.

  • merged-report-table. This contains the detailed information of each impact.