Module: safe.engine.core
Computational engine for InaSAFE core.
Provides the function calculate_impact()
-
safe.engine.core.calculate_impact(layers, impact_fcn)[source]
Calculate impact levels as a function of list of input layers
- Input
layers: List of Raster and Vector layer objects to be used for analysis
impact_fcn: Function of the form f(layers)
- Output
- filename of resulting impact layer (GML). Comment is embedded as
metadata. Filename is generated from input data and date.
- Note
- The admissible file types are tif and asc/prj for raster and
gml or shp for vector data
- Assumptions
- All layers are in WGS84 geographic coordinates
- Layers are equipped with metadata such as names and categories
-
safe.engine.core.check_data_integrity(layer_objects)[source]
Check list of layer objects
- Input
- layer_objects: List of InaSAFE layer instances
- Output
- Nothing
- Raises
- Exceptions for a range of errors
This function checks that
* Layers have correct keywords
* That they have the same georeferences
This module forms part of the InaSAFE tool.