Available with Network Analyst license.
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 introduced below:
- 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 the restriction point barrier is located on.
- 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.
- 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.
- 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 would mean travel is expected to be twice as fast as normal. A factor of 2.0 would mean it is expected to take twice as long as normal. You might want to increase travel time with a scaled cost line barrier when a stretch of highway is temporarily slowed by construction.
- 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.
- 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 would mean travel is expected to be four times faster than normal. A factor of 3.0 would mean it is expected to take three times longer than normal. This type of barrier might be used to model storms that reduce travel speeds in specific regions.
Barriers are part of the network analysis layer, not the network dataset. Therefore, 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 could 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. Yet 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 SDC network dataset, such as StreetMap North America, and think the impedance 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 into barrier classes via the Create Network Location Tool on the Network Analyst toolbar, the Load Locations dialog box, or the Add Locations geoprocessing tool. When barriers are created, loaded, or added, they affect only the items checked on the Network Locations tab of the network analysis layer's Layer Properties dialog box. This is true even when a barrier intersects layers that are unchecked on the Network Locations tab.
Learn more about creating network analysis objects with the Create Network Locations 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 Properties table where only one barrier and its attributes are listed at a time.
Learn about opening the Properties window of network analysis objects
Point Barriers feature layer
When a point barrier is loaded or created, 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 opt to 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
Input fields of point barriers
Input field | Description |
---|---|
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. There are two options:
|
FullEdge | This property is specific to restriction point barriers on edge elements. The default value is False.
|
Attr_[Cost] (for instance, 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
| Together, these four properties describe the point on the network where the object is located. |
CurbApproach | The CurbApproach property specifies the direction of traffic that is affected by the barrier. If a barrier is on an edge and has its curb approach property set to
Since junctions are points and don't have a side, barriers on junctions affect all vehicles regardless of the CurbApproach. |
Input/Output fields of point barriers
Input/output field | Description |
---|---|
Status | This field is constrained by a domain of values, which are listed below (their coded values are shown in parentheses).
After a solve operation, the status can be modified using one of the following status values:
|
Line Barriers feature layer
Whereas point barriers snap to the nearest edge or junction, line barriers don't snap to the network; therefore, line barriers need to 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, the Create Network Location Tool is usually sufficient to accomplish this goal. Alternatively, if the purpose is to restrict a span along an edge, a line feature should be created in an edit session and loaded into the line barriers class. Editing tools, such as the Trace tool, give you more control than the Create Network Location tool and ensures that the line barrier is coincident with the network source features.
Line barrier properties
Input fields of line barriers
Input field | Description |
---|---|
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. There are two options:
|
Attr_[Cost] (for instance, 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, note that if you set this value to zero, solves will likely return nonsensical results since the underlying edge costs become free to traverse. Therefore, it is recommended to 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. Therefore, line barriers need to overlap edges and junctions to have any effect on them.
Polygon barrier properties
The properties for polygon barriers are identical to line barriers.
Input fields of polygon barriers
Input field | Description |
---|---|
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. There are two options:
|
Attr_[Cost] (for instance, 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, note that if you set this value to zero, solves will likely return nonsensical results since the underlying edge costs become free to traverse. Therefore, it is recommended to 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 with 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 with 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 would be restricted as well as the road under the overpass. This is due to the line barrier touching both roads in two-dimensional space. Careful consideration should be given to how you create barriers.
Here are some 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 could be replaced by a point barrier with its FullEdge property set to true. The FullEdge property would ensure the entire edge is restricted and, since the barrier is a point barrier, it would restrict only the edge it is located on.
One caveat is that full-edge point barriers can't be adjusted to affect only a subspan of an edge. Thus, some precision is lost in comparison to line barriers, which can cover and affect subspans. Also, visualizing the point barrier in ArcMap could 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, like the one that represents the overpass, a line feature can be created in an editing environment where the source feature for the edge can be traced. The new, coincident line feature can then be loaded into the line barriers class.
To avoid the problem of restricting the road below the overpass, more careful editing could be performed. For instance, you can create one line feature along the overpass, buffer the road underneath, then clip out the buffered area. This would leave two lines on either side of the road that could be loaded into the line barriers class. Another option is to simply 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 effected elements are covered by the line barrier.
Using the query builder. Before loading or creating barriers, you can write a query using SQL to effectively tell Network Analyst which elements you want the barrier to influence. Once loaded, barriers can touch some network elements without affecting them.
The query builder is accessed by opening the Layer Properties dialog box, right-clicking a network element in the Finding Network Locations panel, and choosing Build Query. The next graphic shows a query that is written before loading a line barrier. When the barrier is loaded, it refers to the query to select which elements it should block.Visualizing barriers added with the Query Builder can be misleading, since edges and junctions could be covered by barriers but still function normally. For instance, in the graphic above, even though the restriction line barrier crosses the edges with ObjectIDs of 43 and 38, they are still traversable, as shown by the route on the right.
Other methods of creating line barriers can be valuable in different scenarios as well. Here are a couple of examples:
- Loading 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.
- Loading a route from another network analysis. Create a route in another network analysis layer, then 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.