Summary
Creates a raster of accumulated flow into each cell.
Illustration
Usage
This raster analysis portal tool is available when you are signed in to an ArcGIS Enterprise portal that has an ArcGIS Image Server configured for Raster Analysis . When the tool is invoked, 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.
Syntax
arcpy.ra.FlowAccumulation(inputFlowDirectionRaster, outputName, {inputWeightRaster}, {dataType}, {flowDirectionType})
Parameter | Explanation | Data 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.
| String |
flowDirectionType (Optional) | Specifies the input flow direction raster type.
| String |
Derived Output
Name | Explanation | Data Type |
outputRaster | The output raster. | Raster Layer |
Code sample
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")
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)
Environments
Licensing information
- Basic: Requires ArcGIS Image Server
- Standard: Requires ArcGIS Image Server
- Advanced: Requires ArcGIS Image Server