Set Flow Direction (Trace Network)

Summary

Sets the flow direction of line features in a version 1 trace network.

Usage

  • Flow direction can only be set with Set Flow Direction tool for line features that participate in a version 1 trace network.

    Legacy:

    The Set Flow Direction tool is not supported with Trace Network Version 2 or later. Use the FLOWDIRECTION network attribute field to set or modify the flow direction of a line feature in the network.

  • The network topology must be enabled.

  • Flow direction can be specified at the feature level with digitized direction, against digitized direction, or as indeterminate. When a selection of features exists on the map, the flow direction will be set for only those features.

    Learn more about how to set flow direction

Syntax

arcpy.tn.SetFlowDirection(input_trace_network, in_edges, flow_direction)
ParameterExplanationData Type
input_trace_network

The trace network that contains the line feature class on which the flow direction will be set.

Note:

This parameter requires a Trace Network Version 1 as input.

Trace Network; Trace Network Layer
in_edges
[in_edges,...]

The polyline features that participate in the input trace network.

Feature Layer
flow_direction

Specifies the flow direction of the edges.

  • WITH_DIGITIZED_DIRECTIONFlow direction will be along the digitized direction of the edges.
  • AGAINST_DIGITIZED_DIRECTIONFlow direction will be against the digitized direction of the edges.
  • INDETERMINATEFlow direction will be indeterminate.
String

Derived Output

NameExplanationData Type
updated_trace_network

The updated trace network.

Trace Network

Code sample

SetFlowDirection example (Python window)

Set the flow direction with digitized direction for the HydroLines edge class.

import arcpy
arcpy.SetFlowDirection_tn("C:\\MyProject\\NHD.gdb\\Hydro\\HydroNetwork_v1", 
                          "HydroLines", "WITH_DIGITIZED_DIRECTION")

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: No
  • Standard: Yes
  • Advanced: Yes

Related topics