RouteDEM for exposing the natcap.invest’s routing package to UI.


RouteDEM: Hydrological routing.

This model exposes the pygeoprocessing D8 and Multiple Flow Direction routing functionality as an InVEST model.

This tool will always fill pits on the input DEM.

  • args['workspace_dir'] (string) – output directory for intermediate, temporary, and final files

  • args['results_suffix'] (string) – (optional) string to append to any output file names

  • args['dem_path'] (string) – path to a digital elevation raster

  • args['dem_band_index'] (int) – Optional. The band index to operate on. If not provided, band index 1 is assumed.

  • args['algorithm'] (string) – The routing algorithm to use. Must be one of ‘D8’ or ‘MFD’ (case-insensitive). Required when calculating flow direction, flow accumulation, stream threshold, and downslope distance.

  • args['calculate_flow_direction'] (bool) – If True, model will calculate flow direction for the filled DEM.

  • args['calculate_flow_accumulation'] (bool) – If True, model will calculate a flow accumulation raster. Only applies when args[‘calculate_flow_direction’] is True.

  • args['calculate_stream_threshold'] (bool) – if True, model will calculate a stream classification layer by thresholding flow accumulation to the provided value in args['threshold_flow_accumulation']. Only applies when args[‘calculate_flow_accumulation’] and args[‘calculate_flow_direction’] are True.

  • args['threshold_flow_accumulation'] (int) – The number of upslope cells that must flow into a cell before it’s classified as a stream.

  • args['calculate_downslope_distance'] (bool) – If True, and a stream threshold is calculated, model will calculate a downslope distance raster in units of pixels. Only applies when args[‘calculate_flow_accumulation’], args[‘calculate_flow_direction’], and args[‘calculate_stream_threshold’] are all True.

  • args['calculate_slope'] (bool) – If True, model will calculate a slope raster from the DEM.

  • args['n_workers'] (int) – The n_workers parameter to pass to the task graph. The default is -1 if not provided.