Flow Accumulation (Raster Analysis)

Title  Flow Accumulation (Raster Analysis)

Summary

Creates a raster of accumulated flow into each cell.


Illustration

Flow Accumulation tool illustration Flow Accumulation tool illustration

Usage


Syntax

Parameter Explanation
inputFlowDirectionRaster

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

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.

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 prompted to provide another name.

inputWeightRaster (Optional)

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

dataType (Optional)

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

  • Float—The output raster will be floating point type. This is the default.
  • Integer—The output raster will be integer type.
  • Double—The output raster will be double type.
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).

Code Samples

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)

                    

Tags

Credits

Use limitations