Skip To Content

Flow Accumulation

Summary

Creates a raster of accumulated flow into each cell.

Illustration

Flow Accumulation tool illustration

Usage

  • The result of Flow Accumulation is a raster of accumulated flow to each cell, as determined by accumulating the weight for all cells that flow into each downslope cell.

  • The Flow Accumulation tool supports three flow modeling algorithms while computing accumulated flow. These are the D8, Multiple Flow Direction (MFD) and D-Infinity (DINF) flow methods.

  • If the input flow direction raster is not created with the Flow Direction tool, there is a chance that the defined flow could loop. If the flow direction does loop, Flow Accumulation will go into an infinite loop and never finish.

    Input flow direction can be created using the D8, Multiple Flow Direction (MFD) or D-Infinity (DINF) methods. The type of input flow direction raster influences how the Flow Accumulation tool partitions and accumulates flow in each cell. Use the Input flow direction type to specify which method was used when the flow direction raster was created.

  • Cells of undefined flow direction will only receive flow; they will not contribute to any downstream flow.

    For an input D8 flow direction raster, a cell is considered to have an undefined flow direction if its value in the flow direction raster is anything other than 1, 2, 4, 8, 16, 32, 64, or 128.

    For an input D-Infinity flow direction raster, a cell is considered to have an undefined flow direction if its value in the flow direction raster is -1.

  • The accumulated flow is based on the number of total or a fraction of cells flowing into each cell in the output raster. The current processing cell is not considered in this accumulation.

  • Output cells with a high flow accumulation are areas of concentrated flow and can be used to identify stream channels.

  • Output cells with a flow accumulation of zero are local topographic highs and can be used to identify ridges.

Syntax

FlowAccumulation_ra (inputFlowDirectionRaster, outputName, {inputWeightRaster}, {dataType}, {flowDirectionType})
ParameterExplanationData Type
inputFlowDirectionRaster

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

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

Raster Layer; Image Service; String
outputName

The name of the output flow accumulation raster service.

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

String
inputWeightRaster
(Optional)

An optional integer input raster for applying a weight to each cell.

Raster Layer; Image Service; String
dataType
(Optional)

The output accumulation raster can be integer, floating or double type.

  • FLOATThe output raster will be floating point type. This is the default.
  • INTEGERThe output raster will be integer type.
  • DOUBLEThe output raster will be double type.
String
flowDirectionType
(Optional)

The input flow direction raster can be of type D8, Multi Flow Direction (MFD) or D-Infinity (DINF).

  • D8The input flow direction raster is of type D8. This is the default.
  • MFDThe input flow direction raster is of type Multi Flow Direction (MFD).
  • DINFThe input flow direction raster is of type D-Infinity (DINF).
String

Code sample

FlowAccumulation example 1 (Python window)

This example creates a raster of accumulated flow into each cell of an input flow direction raster.

import arcpy
arcpy.FlowAccumulation_ra("https://myserver/rest/services/flowdir/ImageServer","outFlowAccumulation1")
FlowAccumulation example 2 (stand-alone script)

This example creates a raster of accumulated flow into each cell of an input flow direction raster.

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

# Import system modules
import arcpy

# Set local variables
inFlowDirection = "https://myserver/rest/services/flowdir/ImageServer"
outputFlowAccumulation = "outFlowAccumulation2"
inWeight = ""
dataType = "DOUBLE"

# Execute Flow Accumulation raster analysis tool
arcpy.FlowAccumulation_ra(inFlowDirection, outputFlowAccumulation, inWeight, dataType)

Licensing information

  • ArcGIS Desktop Basic: Requires ArcGIS Image Server
  • ArcGIS Desktop Standard: Requires ArcGIS Image Server
  • ArcGIS Desktop Advanced: Requires ArcGIS Image Server

Related topics