Flow Accumulation (Raster Analysis)

Summary

Creates a raster of accumulated flow into each cell.

Illustration

Flow Accumulation tool illustration

Usage

  • This raster analysis portal tool is available when you are signed in to an ArcGIS Enterprise portal that has ArcGIS Image Server configured for Raster Analysis. When the tool is run, ArcGIS Pro serves as a client and the processing occurs in the servers federated with ArcGIS Enterprise. The portal tool accepts layers from your portal as input and creates output in your portal.

    The input raster layer supports a layer from the portal, a URI or URL to an image service, or the output from the Make Image Server Layer tool. This tool does not support local raster data or layers.

  • 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.

Parameters

LabelExplanationData Type
Input Flow Direction Raster

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

The flow direction raster can be created using the D8, MFD, or DINF method. Use the Flow Direction Type parameter to specify the method used when the flow direction raster was created.

Raster Layer; Image Service; String
Output Name

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 name already exists, you will be prompted to provide another name.

String
Input Weight Raster
(Optional)

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

Raster Layer; Image Service; String
Output Data Type
(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
Flow Direction Type
(Optional)

Specifies the input flow direction raster type.

  • 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

Derived Output

LabelExplanationData Type
Output Raster

The output raster.

Raster Layer

arcpy.ra.FlowAccumulation(inputFlowDirectionRaster, outputName, {inputWeightRaster}, {dataType}, {flowDirectionType})
NameExplanationData Type
inputFlowDirectionRaster

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

The flow direction raster can be created using the D8, MFD, or DINF method. Use the flowDirectionType parameter to specify the method 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 name already exists, you will be prompted 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)

Specifies the input flow direction raster type.

  • 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

Derived Output

NameExplanationData Type
outputRaster

The output raster.

Raster Layer

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.ra.FlowAccumulation("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.ra.FlowAccumulation(inFlowDirection, outputFlowAccumulation, inWeight, dataType)

Licensing information

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

Related topics