safe.engine.core module

Computational engine for InaSAFE core.

Provides the function calculate_impact()

safe.engine.core.buffer_points(centers, radii, hazard_zone_attribute, data_table=None)[source]

Buffer points for each center with defined radii.

If the data_table is defined, then the data will also be copied to the result. This function is used for making buffer of volcano point hazard.

  • centers (list) – All center of each point (longitude, latitude)
  • radii (int, list) – Desired approximate radii in meters (must be monotonically ascending). Can be either one number or list of numbers
  • hazard_zone_attribute (str) – The name of the attributes representing hazard zone.
  • data_table (list) – Data for each center (optional)

Vector polygon layer representing circle in WGS84

Return type:



Calculate impact levels as a function of list of input layers

Parameters:impact_function (safe.impact_function.base.ImpactFunction) – An instance of impact function.
filename of resulting impact layer (GML). Comment is embedded as metadata. Filename is generated from input data and date.
The admissible file types are tif and asc/prj for raster and gml or shp for vector data
  1. All layers are in WGS84 geographic coordinates
  2. Layers are equipped with metadata such as names and categories

Check list of layer objects

Parameters:layer_objects (list) – List of InaSAFE layer instances
Raises:Exceptions for a range of errors

This function checks that * Layers have correct keywords * That they have the same georeferences