Available with Spatial Analyst license.
Determines the flow of the values in the input raster within each cell's immediate neighborhood.
Focal Flow evaluates the eight immediate neighbors of a cell to determine the flow.
The resulting values from the tool measure flow into, not out of, a cell.
The output values are derived from the binary representation of the results of the analysis.
See Analysis environments and Spatial Analyst for additional details on the geoprocessing environments that apply to this tool.
The input surface raster for which to calculate the focal flow.
The eight immediate neighbors of each cell are evaluated to determine the flow.
The input raster can be integer or floating point.
Defines a value that constitutes the threshold, which must be equaled or exceeded before flow can occur.
The threshold value can be either an integer or floating-point value.
If the difference between the value at a neighboring cell location and the value of the processing cell is less than or equal to the threshold value, the output will be 0 (or no flow).
The output focal flow raster.
The output raster is always of integer type.
This example determines the binary representation of flow for the input raster with a threshold value of 10.
import arcpy from arcpy import env from arcpy.sa import * env.workspace = "C:/sapyexamples/data" focalFlowOut = FocalFlow("elevation", 10) focalFlowOut.save("C:/sapyexamples/output/flowout")
This example determines the binary representation of flow for the input raster with a threshold value of 5.
# Name: FocalFlow_Ex_02.py # Description: Determines the flow of the values in the # input raster within each cell's immediate neighborhood. # Requirements: Spatial Analyst Extension # Import system modules import arcpy from arcpy import env from arcpy.sa import * # Set environment settings env.workspace = "C:/sapyexamples/data" # Set local variables inRaster = "elevation" threshold = 5 # Execute FocalFlow outFocalFlow = FocalFlow(inRaster, threshold) # Save the output outFocalFlow.save("C:/sapyexamples/output/focalflow")
- Basic: Requires Spatial Analyst
- Standard: Requires Spatial Analyst
- Advanced: Requires Spatial Analyst