Map Composer Templating - mf4dl1/jaksafe GitHub Wiki

For InaSAFE you can prepare templates to be used in reporting. InaSAFE uses a convention based approach. Two conventions are supported:

  • Element ID's - InaSAFE looks for elements with specific id's on the composer page and replaces them with InaSAFE specific content.
  • Tokens within text elements - InaSAFE looks for text within a text item and tries to replace it. The text must be written in square brackets [ and ]

Element-ID's

Expected ID Type Purpose
safe-logo Picture Item If used, this will be replaced with the InaSAFE logo.
organisation-logo Picture Item If used this will be replaced with the organisation logo defined in InaSAFE options.
north-arrow Picture Item If used this will be replaced with a north arrow.
impact-map Map Item If used this will be replaced with a map that is centered on the impact area.
impact-legend Legend Item If used, this will be replaced by a legend generated by InaSAFE.
impact-report *Label Item If used, this will be replaced with the detailed impact report. The report may be quote long so should typically be on its own page.

Here is an example of using an element ID to place an organisation logo on the layout:

selection_003

Element Tokens

Token Type Purpose
[impact-title] Label Item Will insert the title for the impact map.
[disclaimer] Label Item Will insert InaSAFE's standard disclaimer paragraph.
[date] Label Item InaSAFE will insert the report date in place of this token.
[time] Label Item InaSAFE will insert the report time in place of this token.
[safe-version] Label Item InaSAFE will insert the version of InaSAFE used to generate the report.

Here is an example of using replacement tokens in a text item. The [date], [time] and [safe-version] will be replaced with the appropriate content when the template is rendered.

selection_004