InaSAFE Disaster risk assessment tool developed by AusAid - Impact Function Manager
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 managing metadata for all impact function.
New in version 2.1.
Get exposure constraints for exposure_key.
Parameters: | exposure_key (str) – The exposure key |
---|---|
Returns: | List of tuple of layer_mode and layer_geometry |
Return type: | list |
Get exposure layer mode for exposure_key.
Parameters: |
|
---|---|
Returns: | List of layer_mode |
Return type: | list |
Return a list of valid available exposures
Parameters: | ascending (bool) – Sort ascending or not. |
---|---|
Returns: | A list of exposures full metadata. |
Return type: | list |
Get hazard constraints for hazard_key and hazard_category_key
Parameters: |
|
---|---|
Returns: | List of tuple of layer_mode and layer_geometry |
Return type: | list |
Return all available layer_mode.
Parameters: |
|
---|---|
Returns: | List of layer_mode |
Return type: | list |
available_hazards from hazard_category_key
Parameters: |
|
---|---|
Returns: | List of available hazards |
Return type: | list |
Get continuous hazard units. :param hazard_key: The hazard key :type hazard_key: str
Parameters: |
|
---|---|
Returns: | List of continuous hazard unit |
Return type: | list |
Return additional_keywords for exposure.
Parameters: |
|
---|---|
Returns: | List of additional keywords |
Return type: | list |
Return list of exposure class field.
Parameters: |
|
---|---|
Returns: | List of exposure class field. |
Return type: | list |
Get hazard categories form layer_geometry_key
Parameters: |
|
---|---|
Returns: | List of exposure unit |
Return type: | list |
Get hazard categories form layer_geometry_key
Parameters: | layer_geometry_key (str) – The geometry id |
---|---|
Returns: | List of hazard |
Return type: | list |
Get available impact functions from hazard and exposure metadata.
Disabled impact function will not be loaded.
Parameters: |
|
---|
Get available impact functions from hazard and exposure keywords.
Disabled impact function will not be loaded.
Parameters: |
|
---|
Return IF classes given its metadata key and value.
Parameters: |
|
---|---|
Returns: | Impact Function classes match the arguments |
Return type: | list |
Obtain all functions that match with the constraints
Parameters: |
|
---|---|
Returns: | List of matched Impact Function |
Return type: | list |
Return an instance of an impact function given its ID.
This is a preferred way to get an instance of IF. IF should have a unique human readable ID in their metadata.
Parameters: | impact_function_id (str) – The ID of impact function in the metadata. |
---|
:return An Impact function instance that has matched id. :rtype: safe.impact_functions.base.ImpactFunction
Return the class of an impact function given its class name.
Parameters: | class_name (str) – the name of IF class |
---|---|
Returns: | impact function class that matches the argument. |
Return type: | safe.impact_functions.base.ImpactFunction |
Get the ID of the impact function.
Parameters: | impact_function (safe.impact_functions.base.ImpactFunction) – Class of an impact function |
---|---|
Returns: | The ID of the impact function specified in its metadata. |
Return type: | str |
Get the human readable name of the impact function.
Parameters: | impact_function (safe.impact_functions.base.ImpactFunction) – Class of an impact function. |
---|
Get title of the impact function.
Parameters: | impact_function (safe.impact_functions.base.ImpactFunction) – Class of an impact function |
---|---|
Returns: | The title of the impact function specified in its metadata. |
Return type: | str |
Return the impact function type.
Parameters: | impact_function (safe.impact_functions.base.ImpactFunction) – The impact function. |
---|
Return all function metadata that has hazard in their metadata.
New in version 2.2.
Parameters: | hazard (dict) – Dictionary that represent the hazard |
---|---|
Returns: | List of impact function metadata. |
Return type: | list |
Return an instance of an impact function given its class name.
Parameters: | class_name (str) – The name of IF class. |
---|---|
Returns: | Impact function instance that matches the argument. |
Return type: | safe.impact_functions.base.ImpactFunction |
Return additional_keywords for hazard.
Parameters: |
|
---|---|
Returns: | List of additional keywords |
Return type: | list |
Get hazard categories form layer_geometry_key
Parameters: |
|
---|---|
Returns: | List of hazard_categories |
Return type: | list |
Get hazard categories form layer_geometry_key
Parameters: |
|
---|---|
Returns: | List of hazard |
Return type: | list |
Get purposes of a layer geometry id.
Parameters: | layer_geometry_key (str) – The geometry id |
---|
Get continuous hazard units. :param hazard_key: The hazard key :type hazard_key: str
Parameters: |
|
---|---|
Returns: | List of raster_hazards_classifications |
Return type: | list |
Get continuous hazard units. :param hazard_key: The hazard key :type hazard_key: str
Parameters: |
|
---|---|
Returns: | List of vector_hazards_classifications |
Return type: | list |