Flow Distance (Raster Analysis)

Title  Flow Distance (Raster Analysis)

Summary

Computes, for each cell, the horizontal or vertical component of downslope distance, following the flow paths, to cells on a stream into which they flow. In case of multiple flow paths, minimum, weighted mean, or maximum flow distance can be computed.

If an optional flow direction raster is provided, the down slope directions will be limited to those defined by the input flow direction raster.


Illustration

Flow Distance tool illustration Flow Distance tool illustration

Usage


Syntax

Parameter Explanation
inputStreamRaster

The input raster that defines the stream network.

inputSurfaceRaster

The input raster representing a continuous surface.

outputName

The name of the output flow distance raster service.

The default name is based on the tool name and the input layer name. If the layer already exists, you will be prompted to provide another name.

inputFlowDirectionRaster (Optional)

The input raster that shows the direction of flow out of each cell.

When a flow direction raster is provided, the down slope direction(s) will be limited to those defined by the input flow directions.

The flow direction raster can be created using the D8, Multiple Flow Direction (MFD), or D-Infinity method. Use the Flow Direction Type parameter to specify the method used when the flow direction raster was created.

distanceType (Optional)

The distance type to be calculated.

  • Vertical—The flow distance calculations represent the vertical component of minimum flow distance, following the flow path, from each cell in the domain to cell(s) on the stream into which they flow. This is the default.
  • Horizontal—The flow distance calculations represent the horizontal component of minimum flow distance, following the flow path, from each cell in the domain to cell(s) on the stream into which they flow.
flowDirectionType (Optional)

Specifies the input flow direction raster type.

  • D8—The input flow direction raster is of type D8. This is the default.
  • MFD—The input flow direction raster is of type Multi Flow Direction (MFD).
  • DINF—The input flow direction raster is of type D-Infinity (DINF).
statisticsType (Optional)

Determines the statistics type used to compute flow distance over multiple flow paths.

If there exists only a single flow path from each cell to a cell on the stream, all statistics types produce the same result.

  • Minimum—Where multiple flow paths exist, minimum flow distance is computed. This is the default.
  • Weighted Mean—Where multiple flow paths exist, a weighted mean of flow distance is computed. Flow proportion from a cell to its downstream neighboring cells is used as a weight for computing weighted mean.
  • Maximum—When multiple flow paths exist, maximum flow distance is computed.

Code Samples

FlowDistance example 1 (Python window)

This example calculates the minimum downslope horizontal flow distance to a cell on the stream raster.


import arcpy
arcpy.FlowDistance_ra("https://myserver/rest/services/streams/ImageServer","https://myserver/rest/services/elevation_fill/ImageServer","outFlowDistanceVertical1")

                    

FlowDistance example 2 (stand-alone script)

This example calculates the minimum downslope vertical flow distance to a cell on the stream raster.


#---------------------------------------------------------------------------
# Name: FlowDistance_example02.py
# Requirements: ArcGIS Image Server

# Import system modules
import arcpy

# Set local variables
inStreams = "https://myserver/rest/services/streams/ImageServer"
inSurface = "https://myserver/rest/services/elevation_fill/ImageServer"
outputFlowDistance = "outFlowDistanceVertical2"
inFlowDirection = ""
distanceType = "VERTICAL"

# Execute Flow Distance raster analysis tool
arcpy.FlowDistance_ra(inStreams, inSurface, outputFlowDistance, inFlowDirection, distanceType)

                    

Tags

Credits

Use limitations