Creates a raster of accumulated flow to each cell.
Learn more about how Flow Accumulation works
Illustration

Creates a raster of accumulated flow to each cell.
Learn more about how Flow Accumulation works

Command line and Scripting
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.
Cells of undefined flow direction will only receive flow; they will not contribute to any downstream flow. A cell is considered to have an undefined flow direction if its value in the <in_flow_direction_raster> is anything other than 1, 2, 4, 8, 16, 32, 64, or 128.
The accumulated flow is based on the number 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.
If the <in_flow_direction_raster> is not created with the FlowDirection command, 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.
The following environment settings affect this tool:
Map Algebra
Cells of undefined flow direction will only receive flow; they will not contribute to any downstream flow. 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.
The accumulated flow is based on the number 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.
If the flow direction raster is not created with the FlowDirection command, there is a chance that the defined flow could loop. If the flow direction does loop, the FlowAccumulation command will go into an infinite loop and never finish.
Learn more about how to specify the input raster dataset in the Map Algebra expression of Raster Calculator.
ArcObjects
Cells of undefined flow direction will only receive flow; they will not contribute to any downstream flow. 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.
The accumulated flow is based on the number 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.
If the flow direction raster is not created with the FlowDirection method, there is a chance that the defined flow could loop. If the flow direction does loop, the FlowAccumulation method will go into an infinite loop and never finish.
The output from the FlowAccumulation method is a floating-point raster object.
The output from the FlowAccumulationInt method is an integer raster object.
| Parameter | Explanation | Datatype |
|---|---|---|
| Input flow direction raster (Required) |
The input raster that records the direction of flow out of each cell. This can be created with the Flow Direction function.
|
Composite Geodataset |
| Output accumulation raster (Required) |
The output raster that shows the accumulated flow to each cell.
|
Raster Dataset |
| Input weight raster (Optional) |
An optional input raster for applying a weight to each cell. If no {in_weight_raster} is specified, a default weight of one will be applied to each cell. For each cell in the output raster, the result will be the number of cells that flow into it.
|
Composite Geodataset |
| Data type (Optional) |
The output accumulation raster can be integer or floating point type.
|
boolean |
# FlowAccumulation_sample.py
# Description:
# Creates a raster of accumulated flow to each cell.
# Requirements: None
# Author: ESRI
# Date: Sept 6, 2005
# Import system modules
import arcgisscripting
# Create the Geoprocessor object
gp = arcgisscripting.create()
try:
# Set local variables
InFlowDirectionRaster = "C:/data/flowdir"
OutAccumulationRaster = "C:/data/flowaccu"
# Check out Spatial Analyst extension license
gp.CheckOutExtension("Spatial")
# Process: FlowAccumulation
gp.FlowAccumulation_sa(InFlowDirectionRaster, OutAccumulationRaster)
except:
# If an error occurred while running a tool, then print the messages.
print gp.GetMessages()
| Parameter | Explanation |
|---|---|
| <dir_grid> | A raster showing direction of flow out of each cell. This can be created using the FlowDirection function. |
| {weight_grid} | The weight assigned to each cell. If no {weight_grid} is specified, a default weight of one will be applied to each cell. For each cell in the output raster, the result will be the number of cells that flow into it. |
flowaccumulation(flowdir) flowaccumulation(flowdir, rainfall) flowaccumulation(flowdirection(elev), rainfall)
IHydrologyOp::FlowAccumulationInt (directionRaster As IGeoDataset, [weightRaster]) As IGeoDataset
Note: The output raster of FlowAccumulation is of Floating Point type. The output of FlowAccumulationInt is of Integer type. FlowAccumulationInt is a member of esriSpatialAnalyst.IHydrologyOp2.
| Parameter | Explanation |
|---|---|
| directionRaster | A raster showing direction of flow out of each cell. This can be created using the IHydrologyOp::FlowDirection method. |
| [weightRaster] | The weight assigned to each cell. If no [weightRaster] is specified, a default weight of one will be applied to each cell. For each cell in the output, the result will be the number of cells that flow into it. The data type for the weightRaster can be any Raster object that supports IGeoDataset (for example, Raster, Raster band, and so on). |
' Create the RasterHydrologyOp object
Dim pHydrologyOp As IHydrologyOp
Set pHydrologyOp = New RasterHydrologyOp
' Declare the input direction raster object
Dim pDirectionDataset As IGeoDataset
' Calls function to open a raster dataset from disk
Set pDirectionDataset = OpenRasterDataset("D:\SpatialData", "directionraster")
' Declare the output raster object
Dim pOutputRaster As IGeoDataset
' Calls the method
Set pOutputRaster = pHydrologyOp.FlowAccumulation(pDirectionDataset)