InaSAFE Disaster risk assessment tool by AusAid -ImpactCalculator.
The module provides a high level interface for running full SAFE analysis.
Contact : ole.moller.nielsen@gmail.com
Note
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Bases: object
Class for running full analysis.
Property for aggregation layer.
Returns: | Aggregation Layer of the analysis. |
---|---|
Return type: | QgsMapLayer |
A helper to spawn an error and halt processing.
An exception will be logged, busy status removed and a message displayed.
Parameters: |
|
---|
Property for exposure layer.
Returns: | Exposure Layer of the analysis. |
---|---|
Return type: | QgsMapLayer |
Generate insufficient overlap message.
Parameters: |
|
---|---|
Returns: | An InaSAFE message object. |
Calculate the best extents to use for the assessment.
Returns: | A tuple consisting of:
|
---|---|
Return type: | dict, QgsRectangle, float, QgsMapLayer, QgsRectangle, QgsMapLayer |
Raises: | InsufficientOverlapError |
Return layer’s title from keywords or layer name if not found.
Parameters: |
|
---|---|
Returns: | Layer’s title |
Return type: | str |
A helper function to determine what the optimal extent is.
Optimal extent should be considered as the intersection between the three inputs. The inasafe library will perform various checks to ensure that the extent is tenable, includes data from both etc.
This is a thin wrapper around safe.storage.utilities.bbox_intersection
Typically the result of this function will be used to clip input layers to a common extent before processing.
Parameters: |
|
---|---|
Returns: | An array containing an extent in the form [xmin, ymin, xmax, ymax] e.g.:: [100.03, -1.14, 100.81, -0.73] |
Return type: | list |
Raises: | Any exceptions raised by the InaSAFE library will be propagated. |
Property for hazard layer.
Returns: | Hazard Layer of the analysis. |
---|---|
Return type: | QgsMapLayer |
A helper function to perform an optimal clip of the input data. Optimal extent should be considered as the intersection between the three inputs. The InaSAFE library will perform various checks to ensure that the extent is tenable, includes data from both etc.
The result of this function will be two layers which are clipped and re-sampled if needed, and in the EPSG:4326 geographic coordinate reference system.
Returns: | The clipped hazard and exposure layers. |
---|---|
Return type: | (QgsMapLayer, QgsMapLayer) |
Send a dynamic message to the listeners.
Dynamic messages represents a progres. Usually it will be appended to the previous messages.
Parameters: | message (Message) – An instance of our rich message class. |
---|
Send an error message to the listeners.
Error messages represents and error. It usually replace the previous message since an error has been happened.
Parameters: | error_message (ErrorMessage) – An instance of our rich error message class. |
---|