Habitat Suitability Package

Model Entry Point

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),
            }
    }
    
  • args['categorical_geometry'] (dict) –

    a dictionary that describes categorical vector geometry that directly defines the HSI values. The dictionary specifies paths to the vectors and the fieldname that provides the raw HSI values with keys:

    ’vector_path’: a path to disk for the vector coverage polygon ‘fieldname’: a string matching a field in the vector polygon
    with HSI values.

    Example:

    {
        'categorical_geometry': {
            'substrate': {
                'vector_path': r'C:/path/to/Substrate.shp',
                'fieldname': 'Suitabilit',
            }
        }
    }
    
Returns:

None