Barriers

Barriers are feature classes in network analysis layers that restrict or alter costs of the underlying edges and junctions of the associated network dataset. Barriers are split into three geometry types (point, line, and polygon) and are designed to model temporary changes to the network. The various types of barriers are as follows:

  • A restriction point barrier can model a fallen tree, an accident, a downed electrical line, or anything that completely blocks traffic at a specific position along the network. For point barriers located on edges, travel can be permitted on the edge but not through the barrier. Optionally, travel can be prohibited anywhere on the edge where the restriction point barrier is located.
    Two maps demonstrate how a restriction point barrier affects a route analysis.
    The map on the left shows the shortest path between two stops without any restriction point barriers. The map on the right has a road that is blocked by a fallen tree, so the shortest path between the same points is longer.
  • An added cost point barrier permits travel through the barrier, but going through it incurs a cost that you specify, such as one minute. Added cost point barriers can be used to model the delay caused by a car accident or the extra time required for a truck carrying hazardous materials to stop at railroad crossings.
    Two maps demonstrate how added cost barriers affect a route analysis.
    The travel time from stop one to stop two would be the same whether going around the north end of the block or the south end; however, since crossing railroad tracks incurs a time penalty (modeled with added cost point barriers), the route with only one railroad crossing is chosen. The cost of crossing the barrier is added to the accumulated cost of the resulting route.
  • A restriction line barrier prohibits travel anywhere the barrier intersects the network. For example, a parade or protest that blocks traffic across several street segments can be modeled with a restriction line barrier. This type of barrier can also quickly fence off several roads from being traversed, thereby channeling results away from undesirable parts of your network.
    Two maps demonstrate how a restriction line barrier affects a route analysis.
    The map on the left displays the shortest path between two points. The map on the right shows the shortest path when several streets are blocked by a restriction line barrier.
  • A scaled cost line barrier doesn't restrict travel on the edges and junctions it covers; rather, it scales the cost of traversing the covered edges and junctions by a factor you specify. Assigning a factor of 0.5 means travel is expected to be twice as fast as normal. A factor of 2.0 means it is expected to take twice as long as normal. You may want to increase travel time with a scaled cost line barrier when a stretch of highway is temporarily slowed by construction.
    Two maps demonstrate how a scaled cost line barrier affects a route analysis.
    The shortest path between two points is shown on the left. On the right, a scaled line barrier increases the cost of traveling on the roads it covers. Unlike the restriction barrier, the route is able to travel on the barrier but with a modified cost. The solver uses the modified cost in calculating the best route; furthermore, the modified cost is included in the accumulated cost of the results.
  • A restriction polygon barrier prohibits travel anywhere the polygon intersects the network. One use of this type of barrier is to model floods covering areas of the network and making road travel there impossible.
    Two maps demonstrate how a restriction polygon barrier affects a route analysis.
    The left side depicts the shortest path between two points. On the right, a polygon barrier blocks flooded streets, so the shortest path between the same two points is different.
  • A scaled cost polygon barrier doesn't restrict travel on the edges and junctions it covers; rather, it scales the cost of traversing the covered edges and junctions by a factor you specify, such as 0.25, which means travel is expected to be four times faster than normal. A factor of 3.0 means it is expected to take three times longer than normal. This type of barrier can be used to model storms that reduce travel speeds in specific regions.
    Two maps demonstrate how a scaled cost polygon barrier affects a route analysis.
    The map on the left shows a route that goes through inclement weather without regard for the effect poor road conditions have on travel time. On the right, a scaled cost polygon barrier doubles the travel time of the roads covered by the storm. Notice the route still passes through the southern tip of the storm since it is quicker to spend more time driving slowly through a small part of the storm than it is to drive completely around it. As with the scaled cost line barrier, the solver uses the modified cost in calculating the best route; furthermore, the modified cost is included in the accumulated costs of the results.

Barriers are part of the network analysis layer, not the network dataset. Barriers only have an effect on the network analysis layer that contains them. If barriers are needed in other analyses, they should be loaded into the appropriate network analysis layer. Alternatively, the network dataset can be edited instead of using barriers.

Any kind of change barriers make to the traversability or element costs of the network can also be accomplished through edits to the network dataset. However, barriers help you add and remove network changes quickly, which is ideal for modeling temporary cost changes: the tree blocking traffic will eventually be removed, and the flood will ultimately recede. Once the event the barrier is modeling is over, the barrier can simply be deleted.

Since barriers can function as a substitute to editing, you can make network traversability and cost changes even when you don't have the editing privileges. For instance, if you have a noneditable network dataset, such as StreetMap Premium North America, and think the cost values do not accurately reflect your travel times in a given area, you can add a polygon barrier and scale the costs to more appropriate values. However, expect slower solver performance with barriers.

The time it takes to create or load a line or polygon barrier is proportional to the number of network elements it covers. Using barriers to cover dense or large regions of your network may not be feasible.

Point, line, and polygon barriers

Barrier classes are present in all network analysis layers.

Barriers can be added to barrier classes using the Create tool on the Edit tab, or the Add Locations geoprocessing tool.

Barriers have attributes that can be examined and edited through an attribute table where all the barriers and their attributes in that barrier class are listed, or through a barrier's Attributes pane where only one barrier and its attributes are listed at a time.

Point Barriers feature layer

When a point barrier is created or added, it snaps to the nearest network edge or junction within a search tolerance. The position of the barrier on the network is specified by the network location fields (SourceID, SourceOID, SideOfEdge, and PosAlong). When a restriction point barrier is on an edge, you can restrict travel across the point barrier only, or restrict the edge entirely. A scaled cost point barrier adds a cost whenever it is crossed.

Point barrier properties

The following tables describe point barrier properties:

Input fields of point barriers

Input fieldDescription

ObjectID

The system-managed ID field.

Name

The name of the network analysis object.

BarrierType

Specifies whether the point barrier restricts travel completely or adds cost when it is crossed. The following options are available:

  • Restriction (0)—Prohibits traversing through the barrier. This is the default value.
  • Added Cost (2)—Traversing through the barrier increases the network cost by the amount specified in the Attr_[Cost] property value.

FullEdge

This property is specific to restriction point barriers on edge elements. The default value is False.

  • False—Permits travel on the edge up to the barrier but not through it.
  • True—Restricts travel anywhere on the associated edge.

Attr_[Cost]

(For example, Attr_Minutes, where Minutes is a cost attribute on the network.)

This property is specific to added-cost barriers and is limited to values that are greater than or equal to zero. It indicates how much network cost is added when the barrier is traversed.

Network location fields

  • SourceID
  • SourceOID
  • PosAlong
  • SideOfEdge
  • SnapX
  • SnapY
  • SnapZ
  • DistanceToNetworkInMeters

Together, these properties describe the point on the network where the object is located.

Learn more about locating inputs on a network

CurbApproach

The CurbApproach property specifies the direction of traffic that is affected by the barrier. The following options are available:

  • Either side of vehicle (0)—The barrier affects travel over the edge in both directions.
  • Right side of vehicle (1)—Vehicles are only affected if the barrier is on their right side during the approach. Vehicles that traverse the same edge but approach the barrier on their left side are not affected by the barrier.
  • Left side of vehicle (2)—Vehicles are only affected if the barrier is on their left side during the approach. Vehicles that traverse the same edge but approach the barrier on their right side are not affected by the barrier.

Since junctions are points and don't have a side, barriers on junctions affect all vehicles regardless of the curb approach.

Input/Output fields of point barriers

Input/output fieldDescription

Status

This field is constrained by a domain of values, which are listed below (their coded values are shown in parentheses).

  • OK (0)—The network location is valid.
  • Not located (1)—The location on the network can't be determined.
  • Network element not located (2)—The network element where the network location is supposed to be can't be found. This can occur when a network edge is deleted and the network location is not recalculated.

After a solve operation, the status can be modified using one of the following status values:

  • OK (0)—The network location was successfully evaluated.
  • Invalid field values (4)—The field values of the network location fall outside the analysis layer's coded or range domains. For example, a negative number may exist where positive numbers are required.

Line Barriers feature layer

While point barriers snap to the nearest edge or junction, line barriers don't snap to the network. Line barriers must overlap edges and junctions to have any effect on them.

If the purpose of the line barrier is to cut across network elements and block travel where the barrier intersects edges and junctions, a line feature should be created in an edit session and loaded into the line barriers class.

Line barrier properties

The following table describes line barrier properties:

Input fields of line barriers

Input fieldDescription

ObjectID

The system-managed ID field.

Name

The name of the network analysis object.

BarrierType

Specifies whether the barrier restricts travel completely or scales the cost of traveling through it. The following options are available:

  • Restriction (0)—Prohibits traversing through any part of the barrier. This is the default value.
  • Scaled Cost (1)—Scales the cost of underlying edges by multiplying them by the value of the Attr_[Cost] property. If edges are partially covered by the barrier, the cost is apportioned and multiplied.

Attr_[Cost]

(For example, Attr_Minutes, where Minutes is a cost attribute on the network.)

This property is specific to scaled cost barriers. It is the factor by which the cost of edges underlying the barrier are multiplied.

Values must be zero or greater; however, if you set this value to zero, solves will likely return nonsensical results since the underlying edge costs become free to traverse. It is recommended that you use values greater than zero.

Polygon Barriers feature class

Polygon barriers are similar to line barriers in that they don't snap to the network. Polygon barriers must overlap edges and junctions to have any effect on them.

Polygon barrier properties

The properties for polygon barriers are identical to line barriers and are described in the following table:

Input fields of polygon barriers

Input fieldDescription

ObjectID

The system-managed ID field.

Name

The name of the network analysis object.

BarrierType

Specifies whether the barrier restricts travel completely or scales the cost of traveling through it. The following options are available:

  • Restriction (0)—Prohibits traversing through any part of the barrier. This is the default value.
  • Scaled Cost (1)—Scales the cost of underlying edges by multiplying them by the value of the Attr_[Cost] property. If edges are partially covered by the barrier, the cost is apportioned and multiplied.

Attr_[Cost]

(For example, Attr_Minutes, where Minutes is a cost attribute on the network.)

This property is specific to scaled cost barriers. It is the factor by which the cost of edges underlying the barrier are multiplied.

Values must be zero or greater; however, if you set this value to zero, solves will likely return nonsensical results since the underlying edge costs become free to traverse. It is recommended that you use values greater than zero.

Precedence of overlapping barriers

When two or more barriers overlap, the ArcGIS Network Analyst extension follows a set of rules to guarantee consistent behavior and results:

  • Restriction barriers take precedence over added cost and scaled cost barriers.
  • If two or more added cost barriers are coincident, their Attr_[Cost] values are added together for each cost.
  • If two or more scaled- cost barriers overlap, their Attr_[Cost] values are multiplied together for each cost and multiplied by the corresponding cost of the covered portion of the underlying edge.
  • If both added cost and scaled cost barriers overlap, the scaled cost barriers are multiplied by the covered portion of the underlying edge first. Then the product is added to the corresponding Attr_[Cost] values of the added cost barriers.

Methods of creating barriers

This section highlights some of the options you have when creating barriers and cites some of their advantages and disadvantages to help you understand the different approaches and choose the one that best fits your needs.

Point barriers are associated with only one network element, even if the element is coincident with another element. Alternatively, line and polygon barriers affect, by default, all network elements they cover. Unintended consequences can occur if any of the network elements under line or polygon barriers are overlooked. For example, if the road on an overpass is being resurfaced and a restriction line barrier is added along the overpass, both the span of the overpass and the road under the overpass are restricted. This is due to the line barrier touching both roads in two-dimensional space. Careful consideration should be given to how you create barriers.

The following are other methods to consider in the overpass scenario above that accomplish the goal of blocking the overpass without blocking the road below:

  • Use a point barrier—The line barrier on the overpass can be replaced by a point barrier with its FullEdge property set to true. The FullEdge property ensures that the entire edge is restricted and, since the barrier is a point barrier, it restricts only the edge where it is located.

    One caveat is that full-edge point barriers can't be adjusted to affect only a subspan of an edge. Some precision is lost in comparison to line barriers, which can cover and affect subspans. Also, visualizing the point barrier can be misleading, since the barrier is displayed as a point but actually restricts the entire edge.

  • Use an editing environment—To ensure that a line barrier is truly coincident with an edge, such as the one that represents the overpass, a line feature can be created in an editing environment in which the source feature for the edge can be traced. The new, coincident line feature can then be loaded into the line barriers class.

    Edit carefully to avoid restricting the road below the overpass. For example, you can create one line feature along the overpass, buffer the road underneath, and clip out the buffered area. This leaves two lines on either side of the road that can be loaded into the line barriers class. Another option is to trace two edges on the overpass, one on either side of the road below. This requires a little more effort, but visualizing the effects that barriers have on the network is clear since the affected elements are covered by the line barrier.

Other methods of creating line barriers can be valuable in different scenarios as well. The following are examples:

  • Load selected features—Select features, such as streets, and load selected streets into the barriers class. This ensures that the line barriers are coincident with the street.
  • Load a route from another network analysis—Create a route in another network analysis layer, and load the route back into your original analysis layer as a line barrier. This method ensures that the line barrier is coincident with streets, and instead of only covering entire edges, it gives you the flexibility to make line barriers that only partially cover edges.