### Navigation

- index
- modules
- next
- previous
- Home »
- Contents »
- InaSAFE’s API documentation »
- Package::safe_qgis »

# Module: safe_qgis.impact_calculator

InaSAFE Disaster risk assessment tool developed by AusAid - ISImpactCalculator.

The module provides a high level interface for running SAFE scenarios.

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.

class `safe_qgis.impact_calculator.``ImpactCalculator`

  A class to compute an impact scenario. We inherit from QObject so that we can use Qt translation self.tr calls.

  `exposureLayer`()

    Accessor for the exposure layer.

    Args:
      None
    Returns:
      A QgsMapLayer or None depending on if the layer is set
    Raises:
      None
  `function`()

    Accessor for the function layer.

    Args:
      None
    Returns:
      An inasafe function or None depending on if the layer is set
    Raises:
      None
  `getRunner`()

    Factory to create a new runner thread. Requires three parameters to be set before execution can take place:

    - Hazard layer - a path to a raster (string)
    - Exposure layer - a path to a vector hazard layer (string).
    - Function - a function name that defines how the Hazard assessment will be computed (string).
    Args:
      None.
    Returns:
      None
    Raises:
      InsufficientParametersException if not all parameters are set.
  `hazardLayer`()

    Accessor for the hazard layer.

    Args:
      None
    Returns:
      A QgsMapLayer or None depending on if the layer is set
    Raises:
      None
  `setExposureLayer`(theLayerPath)

    Mutator for Exposure layer property (e.g. buildings or features that will be affected).

    Args:
      theLayerPath - This should be a string representing a path to a file which can be loaded as a SAFE readlayer instance.
    Returns:
      None
    Raises:
      None
  `setFunction`(theFunctionName)

    Mutator: function layer. Function property (specifies which inasafe function to use to process the hazard and exposure layers with.

    Args:
      theFunctionName - This should be a string containing the name of a valid SAFE impact_function.
    Returns:
      None
    Raises:
      None
  `setHazardLayer`(theLayerPath)

    Mutator: hazard layer. Hazard layer property (e.g. a flood depth raster). This should be a SAFE readlayer instance.

    Args:
      theLayerPath - This should be a string representing a path to a file which can be loaded as a SAFE readlayer instance.
    Returns:
      None
    Raises:
      None

This module forms part of the InaSAFE tool.

### Navigation

- index
- modules
- next
- previous
- Home »
- Contents »
- InaSAFE’s API documentation »
- Package::safe_qgis »