Identifies cells that result in flow loops on a flow direction raster.
Usage
The output point features represent the locations where flow loops have been identified. A loop occurs when the flow directions form a circular path or the cells flow towards each other.
This tool supports the D8 and multiple flow direction (MFD) flow direction types. These can be created using the Flow Direction tool or the Derive Continuous Flow tool.
The input raster that shows the direction of flow out of each cell.
Use the flow_direction_type parameter to specify the method used when the flow direction raster was created.
Raster Layer
out_point_features
The output feature class that will contain the cell locations where flow loops occur.
Each input cell that is part of a loop will be assigned a unique number.
Additional fields are added to the attribute table recording specific information about the point features.
The LoopID field records which cells belong to the same loop.
The FlowDir field records the flow direction value from the input raster.
The Col field records the raster column index of the loop cell.
The Row field records the raster row index of the loop cell.
Feature Class
flow_direction_type
(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 Multiple Flow Direction (MFD).
String
Code sample
ValidateFlowDirection example 1 (Python window)
This example shows how to use ValidateFlowDirection to generate point features representing the location of loops in the input D8 flow direction raster.
from arcpy import env
from arcpy.sa import *
env.workspace = "C:/sapy/examples/data"
ValidateFlowDirection("flowdirection_d8.tif", "C:/sapyexamples/output/flowloops.shp", "D8")
ValidateFlowDirection example 2 (stand-alone script)
This example shows how to use ValidateFlowDirection to generate point features representing the location of loops in the input D8 flow direction raster.
# Name: ValidateFlowDirection_standalone.py
# Description: Generates point features representing the
# location of flow loops in a D8 flow direction raster.
# Requirements: Spatial Analyst extension
# Import system modules
import arcpy
from arcpy import env
from arcpy.sa import *
# Set the analysis environments
env.workspace = "C:/sapyexamples/data"
# Set the local variables
in_flow_direction_raster = "in_flowdirection_d8.tif"
out_points = "C:/sapyexamples/output/flow_loop_points.shp"
flow_direction_type = "D8"
# Run
ValidateFlowDirection(in_flow_direction_raster, out_points,
flow_direction_type)