# Habitat Suitability Package¶

## Model Entry Point¶

System Message: WARNING/2 (/home/docs/checkouts/readthedocs.org/user_builds/invest/checkouts/3.3.1/doc/api-docs/supporting_ecosystem_services/habitat_suitability.rst, line 7)

autodoc: failed to import function u’execute’ from module u’natcap.invest.habitat_suitability.habitat_suitability’; the following exception was raised: Traceback (most recent call last): File “/home/docs/checkouts/readthedocs.org/user_builds/invest/envs/3.3.1/local/lib/python2.7/site-packages/sphinx/ext/autodoc.py”, line 385, in import_object __import__(self.modname) ImportError: No module named habitat_suitability

## Habitat Suitability¶

System Message: WARNING/2 (/home/docs/checkouts/readthedocs.org/user_builds/invest/checkouts/3.3.1/doc/api-docs/supporting_ecosystem_services/habitat_suitability.rst, line 12)

autodoc: failed to import module u’natcap.invest.habitat_suitability.habitat_suitability’; the following exception was raised: Traceback (most recent call last): File “/home/docs/checkouts/readthedocs.org/user_builds/invest/envs/3.3.1/local/lib/python2.7/site-packages/sphinx/ext/autodoc.py”, line 385, in import_object __import__(self.modname) ImportError: No module named habitat_suitability

## Module contents¶

Habitat suitability model.

natcap.invest.habitat_suitability.execute(args)

Habitat Suitability.

Calculate habitat suitability indexes given biophysical parameters.

The objective of a habitat suitability index (HSI) is to help users identify areas within their AOI that would be most suitable for habitat restoration. The output is a gridded map of the user’s AOI in which each grid cell is assigned a suitability rank between 0 (not suitable) and 1 (most suitable). The suitability rank is generally calculated as the weighted geometric mean of several individual input criteria, which have also been ranked by suitability from 0-1. Habitat types (e.g. marsh, mangrove, coral, etc.) are treated separately, and each habitat type will have a unique set of relevant input criteria and a resultant habitat suitability map.

Parameters: args['workspace_dir'] (string) – directory path to workspace directory for output files. args['results_suffix'] (string) – (optional) string to append to any output file names. args['aoi_path'] (string) – file path to an area of interest shapefile. args['exclusion_path_list'] (list) – (optional) a list of file paths to shapefiles which define areas which the HSI should be masked out in a final output. args['output_cell_size'] (float) – (optional) size of output cells. If not present, the output size will snap to the smallest cell size in the HSI range rasters. args['habitat_threshold'] (float) – a value to threshold the habitat score values to 0 and 1. args['hsi_ranges'] (dict) – a dictionary that describes the habitat biophysical base rasters as well as the ranges for optimal and tolerable values. Each biophysical value has a unique key in the dictionary that is used to name the mapping of biophysical to local HSI value. Each value is dictionary with keys: ‘raster_path’: path to disk for biophysical raster. ‘range’: a 4-tuple in non-decreasing order describing the “tolerable” to “optimal” ranges for those biophysical values. The endpoints non-inclusively define where the suitability score is 0.0, the two midpoints inclusively define the range where the suitability is 1.0, and the ranges above and below are linearly interpolated between 0.0 and 1.0. Example: { 'depth': { 'raster_path': r'C:/path/to/depth.tif', 'range': (-50, -30, -10, -10), }, 'temperature': { 'temperature_path': ( r'C:/path/to/temperature.tif'), 'range': (5, 7, 12.5, 16), } }  None