# Turns in the network dataset

A turn models a movement from one edge element to another. Often turns are created to increase the cost of making the movement, or prohibit the turn entirely. For example, a turn feature representing a left-hand turn at an intersection could be assigned a cost of 30 seconds to model the average time it takes for the left-turn light to change to green. Similarly, a restriction attribute could read a field value from a turn feature to prohibit it. This is useful when the turning movement is posted as illegal (no left turns).

Turns can be created at any junction where edges connect. There are n² possible turns at every network junction, where n is the number of edges connected at that junction. Even at a junction with a single edge, it is possible to make one U-turn.

## Multiedge turns

A simple turning movement between two edges connected at a junction is referred to as a two-edge turn. The ArcGIS Network Analyst extension supports modeling multiedge turns. A multiedge turn is a movement from one network edge element to another through a sequence of connected intermediate edge elements. These intermediate edges are referred to as the interior edges of a turn. In a street network, the interior edges of a turn are typically those edge elements that represent the interior of an intersection of divided roads.

The example shown above depicts a multiedge left turn at an intersection of two divided roads. Edges c and d represent interior edges of the turn, while edges f and i represent the exterior edges.

## U-turns

A U-turn is a movement from an edge element through one of its ends back onto itself. It is typically modeled as a turn with two entries in the edge sequence, where both entries are the same edge element.

When dealing with divided roads, a U-turn is modeled as a multiedge turn, where edges f and e are exterior edges and c, d, and a are interior edges.

## Properly defined turns

A turn can be used in a network only if it is properly defined. A properly defined turn must obey the following rules:

• A turn is a sequence of at least two edges. A U-turn constitutes movement from an edge to itself.
• The first or last edge (any exterior edge) in the turn cannot be an interior edge of another turn. In the example in the section above, no turn can begin from (or end at) a, d, or c.
• Every edge in the sequence is connected to the next edge in the sequence to form a nonbranching chain of connected edges. Within a turn, any edge (exterior or interior) can be connected to only one edge. In the example above, within the U-turn (f-c-d-a-e), d is connected only to a.
• Interior edges can be shared among turns. In the example above, the interior edges c and d are shared by the U-turn (f-c-d-a-e) and the left turn (f-c-d-i). Edges that are interior to one turn become interior to all turns.
• Two turn features cannot represent the same turning movement. This means two turns cannot have the same first and last exterior edges.
• Turn features should not begin or end on top of a junction.

## Turn features

In the ArcGIS Network Analyst extension, turns are modeled as features in a turn feature class. A turn feature class is a custom line feature class (of the type Esri turn feature).

Outside a network, a turn feature class has no meaning. To use its valuable information, you must be able to add it to a network dataset. To add a turn feature class to a network, it should be in the same feature dataset as other feature sources for the network dataset. In a shapefile environment, the turn feature class must be in the same directory (shapefile workspace) and must have the same spatial reference as the edge feature sources in the network dataset. Multiple turn feature classes are allowed in a network dataset. The turn feature source does not participate in connectivity groups, nor does it have any elevation field information. The user-defined fields of the turn feature class can be used in the Field evaluator of a network attribute in a similar fashion as fields from other feature class sources.

When creating a turn feature class, you can specify the maximum number of edges supported in a turn. A turn has a minimum of two edges. Network Analyst supports turns that can have a maximum of 50 edges. The default maximum number of edges is 5.

Learn about creating a new turn feature class

### Schema of a turn feature class

The following table describes the fields in a turn feature class that support a maximum of five edges:

FieldDescription

OBJECTID

The internal feature number of the turn.

SHAPE

The feature geometry of the turn feature.

Edge1End

Indicates whether the turn passes through the end of the first edge (Y means the turn passes through the end of the first edge, while N means the turn passes through the beginning of the first edge).

Edge1FCID

The feature class ID of the line feature representing the first edge of the turn.

Edge1FID

The feature ID of the line feature representing the first edge of the turn.

Edge1Pos

The position along the line feature that represents the first edge of the turn. For a line feature that represents multiple edges, which can be created by lines with any vertex connectivity or points with override policy, the position indicates which of the feature's edge elements is the first edge in the turn.

Edge2FCID

The feature class ID of the line feature representing the second edge of the turn.

Edge2FID

The feature ID of the line feature representing the second edge of the turn.

Edge2Pos

The position along the line feature that represents the second edge of the turn.

Edge3FCID

The feature class ID of the line feature representing the third edge in a multiedge turn with three or more edges.

Edge3FID

The feature ID of the line feature representing the third edge in a multiedge turn with three or more edges.

Edge3Pos

The position along the line feature that represents the third edge of a multiedge turn with three or more edges.

Edge4FCID

The feature class ID of the line feature representing the fourth edge in a multiedge turn with four or more edges.

Edge4FID

The feature ID of the line feature representing the fourth edge in a multiedge turn with four or more edges.

Edge4Pos

The position along the line feature that represents the fourth edge of the turn with four or more edges.

Edge5FCID

The feature class ID of the line feature representing the fifth edge in a multiedge turn with five or more edges.

Edge5FID

The feature ID of the line feature representing the fifth edge in a multiedge turn with five or more edges.

Edge5Pos

The position along the line feature that represents the fifth edge of the turn with five or more edges.

The OBJECTID, SHAPE, and Edge1End fields are present in all turn feature classes. The other fields vary based on the maximum number of edges supported. A turn feature class that supports a maximum of six edges will have Edge6FCID, Edge6FID, and Edge6Pos fields in addition to those listed above.

You can add other fields to a turn feature class. For example, it is common to add a field to represent the average time it takes to complete turns. A field evaluator on a time-based cost attribute in the network dataset can read the delay from the turn feature class and incorporate it into the network costs.

### Turn tables and turn features

ARC/INFO and ArcView GIS (precursors of ArcGIS) used turn tables to model turning movements. These turn tables stored two-part turn information as rows, along with a field for time impedance. A negative impedance implied that the turn was restricted.

The example above shows how common turning movements were represented using turn tables. In the ArcGIS Network Analyst extension, each of these situations would be represented by turn features.

• U-turn—A U-turn can be represented by a turn feature with the same first and last edge. In addition, the turn feature class has a field, Turn Impedance, that stores the impedance of 20 seconds for the said turn.
• Stop Sign—The three rows of the turn table can be represented by three turn features—one left turn with 20 seconds turn impedance, one right turn with 10 seconds turn impedance, and a straight-through turn with 15 seconds turn impedance.
• No Right Turn—A turn feature class can have a field that can be read by a field evaluator for a restriction attribute in the network dataset. This allows the modeling of prohibited turns, such as the prohibited right turn.

ArcGIS provides tools for importing existing turn tables into turn feature classes. This is relevant if you have turn tables from ARC/INFO or ArcView GIS.

## Turn attributes

Turns can have attributes containing information about the movement through the network. You can use turn attributes to specify the time cost of the turn or whether the turn is restricted for example. Turn attributes are defined with evaluators the same way edge attributes are defined; however, since turns are directed, they only have evaluators for the along-direction, not the against-direction.

## Global turns

An implied global turn is present at every transition between two edges in the network where there is no existing turn feature. You can assign attribute values to global turns by specifying a global turn delay evaluator for the default values of turn elements.