Browse files

Added documentation for use of assign_hazar_values_to_exposure in imp…

…act function writing guide
  • Loading branch information...
uniomni committed Mar 12, 2013
1 parent b8a1808 commit 5b322d11f7a556836cb3453bf2e13ecaf684bef5
Showing with 31 additions and 2 deletions.
  1. +31 −2 docs/source/developer-docs/writing_impact_functions.rst
@@ -122,8 +122,8 @@ Following the docstring is a collection of variables that define and document th
In addition, there is a collection of text variables used for various levels of documentation of this impact function. They are ``synopsis``, ``actions``, ``detailed_description``, ``permissible_hazard_input``, ``permissible_exposure_input`` and ``limitation``. See examples below for more possible usages.
-Impact function algorithm
+Impact function method
The actual calculation of the impact function is specified as a method call called ``run``. This
method will be called by InaSAFE with a list of the 2 selected layers (hazard and exposure):
@@ -206,6 +206,35 @@ get_projection The spatial reference for the layer http:/
================ ==================================================== ========================================================================================
+Impact function calculation
+With the numerical data from raster or vector layers quite arbitrary calculations can be made.
+However, one typical operation is to create a combined layer where the exposure data is augmented with the hazard level. How this is done and used depends
+on the spatial data types but the call is always the same
+ I = assign_hazard_values_to_exposure_data(H, E, <optional keyword arguments>)
+where H is the hazard layer, either raster or polygon vector data, and E the exposure layer, either of spatial type raster, polygon or point vector data.
+In either case the result I represents the exposure data with hazard levels assigned. A number of options are also available as keyword arguments
+(depending on the data types):
+================ ==================
+Keyword argument Description
+================ ==================
+layer_name Optional name of returned layer
+attribute_name Name of new attribute in exposure layer depending on input data types
+mode Interpolation mode: 'linear' (default) or 'constant. Only used when hazard is a raster layer
+================ ==================
+See full documentation of the is function in section :ref:`data_types` an in the source code
+See also examples of use in the impact function examples below.
.. _raster_raster:
Impact function for raster hazard and raster exposure data

0 comments on commit 5b322d1

Please sign in to comment.