Understanding Networks in ArcGIS
Understanding Networks in ArcGIS
Iowa, 2013). Copyright 2013 by Maribeth H. Price. May be freely distributed with this notice intact.
245
Chapter 9
Network Analysis
Junction
flag
Junction
barrier
247
Chapter 9
Barrier
b
Flag
248
Network Analysis
Barrier
Flag marking
intake gallery
Flag
Loop
Flow
?
Fig. 9.10. A loop in a utility
network cannot flow.
Chapter 9
Trace Upstream/Downstream
About ArcGIS
Geodatabases are used in ArcGIS to create and store networks.
Networks are topological data structures that can be built from
existing simple feature classes. A feature class containing roads,
for example, can be used to create a transportation network.
Multiple layers can be combined to form more complex networks.
A water supply network might include feature classes representing
pumping stations, pipes, valves, and meters.
250
Outage
reports
Network Analysis
251
Chapter 9
Establish
flow
Solve
Fig. 9.15. The Utility Network Analyst toolbar contains all the functions needed to analyze
networks in ArcMap.
The overall process of analyzing a network includes
specifying the network to be used, choosing the tracing
task, adding flags or barriers, and solving. Once a
solution is obtained, it may be cleared before going on.
The Analysis > Options menu choice opens a window
with four tabs. These options control the analysis by
specifying which features will be traced, whether the
features will be weighted, and the format of the results.
The output of a trace may take the form of a drawing or
a set of selected features (Fig. 9.16). The features
returned can include all features matching the criteria of
the trace task or simply those stopping the trace. The
user can also choose whether to return edges or
junctions or both.
Building networks
Building valid networks requires ingenuity and attention
to detail, especially if the network is to be used for
sophisticated modeling. The planning stage is
important, and the builder must consider a number of
issues in designing the network, including using simple
or complex edges, assigning weights, using domains or
subtypes, and establishing connectivity rules.
SKILL TIP: An ArcGIS Standard or Advanced license is required in order to create networks.
If you have the license and want to try creating a network, learn how in the Skills Reference
(Files and Geodatabases).
252
Network Analysis
Network edges occur in two different styles, simple edges and complex edges (Fig. 9.17).
A simple edge can have junctions only at its endpoints. A complex edge can have one or more
junctions in its middle.
Complex edges offer advantages when
keeping track of long features. For
example, a water main along a street has
junctions composed of T-valves that
branch off to laterals carrying water to
each individual house. Using simple
edges, the main would have to be broken
into multiple pieces between each
T-valve. However, for purposes of queries
and maintenance, the water main is more
logically and easily treated as a single
feature. When clicking on the water main,
it would be better to select the entire
feature, not just one tiny segment between
two laterals. By using a complex edge
network, the water main can remain a
single feature while allowing the junctions
of the laterals to connect to it.
When creating a network, the user can include certain attributes that establish weights for each
edge and junction. Such weights allow for more realistic modeling of flow. For example, in
analyzing possible routes from a fire station to a fire, the shortest route is not necessarily the
fastest. A longer route with less traffic, fewer traffic lights, and a higher speed limit might serve
better than the shortest route. A more realistic travel network could include a travel time attribute
for the road features and point junctions representing traffic lights with different average delays.
When creating the network, these attributes would be specified as weights, to take into account
costs associated with traversing the edges or passing through the junctions. Weights can only be
established during network creation.
253
Chapter 9
Summary
Networks are used to model the flow of objects or materials along an interconnected system
of edges and junctions.
Transportation networks are distinguished by the fact that the material can independently
determine how it will flow. In a utility network, the direction of flow is determined by the
network topology and the location of sources and sinks.
Programs called solvers may be applied to analyzing flow through a network. Solvers
typically use three types of input: the network itself, flags indicating points of interest such as
delivery locations, and barriers that prevent flow.
Network weights are stored as attributes of edges. Weights can be used during analysis to
determine, for example, the shortest path or the shortest travel time. They can also be used to
accumulate the costs of moving along the network.
Networks are stored in feature datasets, and they may include some or all of the feature
classes in the dataset.
Network topology, connectivity, and relationships are stored in data tables and collectively
represent the logical network. The actual line and point features represent the geometric
network.
Network topology is created in ArcCatalog. Once established, it is updated and maintained
during editing. Building networks requires an ArcGIS Standard or Advanced license.
Networks may be composed of simple edges, which always end at junctions, or complex
edges, which can contain junctions in the middle of the feature.
TIP: Weights are set up at the time the network is created. If no weights are listed in the dropdown boxes, then the network contains no weights, and none can be used.
TIP: Some tracing tools will not work if the flags or the barriers are of different types. For an
analysis, try to always use edge flags and edge barriers together or junction flags and junction
barriers together.
Important Terms
barrier
edge
flag
254
geometric network
junction
logical network
network weights
sink
solver
source
trace
Network Analysis
255
Chapter 9
256
Network Analysis
TIP: Flags and barriers should match types. For best results, always use junction flags and
junction barriers together or edge flags and edge barriers together.
The path solution appears as a bold red line connecting the flags. This path meets the criterion
that it follows the minimum number of edges through the network. Since this is a transportation
network, traffic can travel in either direction. Now lets try another one.
3 Choose Analysis > Clear Flags from the Utility Network Analyst menu.
3 Choose Analysis > Clear Results from the Utility Network Analyst menu.
3 Click the Junction Flag tool and add two flags at any locations you choose.
TIP: If the flag does not snap to the right location, clear the flags and start again. Zooming in will
make it easier to snap to the right spot.
3 Click Solve.
4 Clear the flags and the results again using the Analysis menu.
4 Choose the Edge Flag tool, try adding a pair of edge flags, and then solve.
4 Clear the flags and the results.
TIP: Flags and barriers will be snapped to the closest feature within the snap tolerance set from
the General tab in the Analysis > Options menu on the Utility Network Analyst toolbar.
Now lets explore the use of barriers to help find the best way to take a child to school. Imagine
that you live on Harney Dr and that your child goes to Southwest Middle School.
5 Choose Bookmarks > School Trips 1 from the main menu bar.
5 Click the Find tool on the Tools toolbar.
5 Type Harney as the text for which to search, and set the layer to Roads. Click Find.
5 Hold down the Ctrl-key and click on each Harney Dr entry in turn to select them all.
Dont select Harney Pl or the others.
5 Right-click on one of the entries and choose Select. Harney Dr will be selected.
5 Use the Find tool to locate Southwest and select the school in the Schools layer.
5 Close the Find window.
6 Zoom in to the extent of Harney Dr to more easily mark the right spot with the flag.
6 Click the Edge Flag tool.
6 Place a flag near the middle of Harney Dr, and use the Zoom to Previous Extent
button to return to the original extent.
7 Place another edge flag on Park Dr next to the school, zooming as necessary.
7 Zoom back to see both flags, and make sure the trace task is set to Find Path.
7 Click Solve.
257
Chapter 9
Well, that was probably the answer you expected. Perhaps you are wondering, however, how far
it is from home to school.
8 Click the Solve button again without moving the mouse off it, and this time keep an
eye on the lower-left corner of the map window to see the cost.
4. What is the cost of this trip and what are the units of the cost? ________________________
It would be more interesting to learn the distance. To find distances, you must use a weight.
8 Choose Analysis > Options from the Utility Network Analyst menu bar.
8 Click the Weights tab.
8 Set both the along and the against edge weights to Distance. Click OK.
8 Clear the results (but not the flags).
8 Click Solve again and watch for the cost.
5. What is the cost and what are the units? _________________________________
TIP: When specifying weights in a Transportation network, it is critical to specify a weight both
FOR and AGAINST the direction of travel. If only one weight is chosen, then cost will
accumulate only when travel is in the same direction as the line, and the total will be too small.
On the first day of school, you discover that an enormous traffic jam builds up at the intersection
south of the school. You wonder if there is an alternate route through the tangle of residential
streets north of the school and what the street names are. First, though, lets turn on Map Tips.
9 Right-click the Roads layer and choose Properties.
9 Click the Display tab. Check the Show MapTips box.
9 Make sure that the Display Expression Field is set to ROADNAME. Click OK.
With Map Tips on, use the cursor to hover over a street to find out its name. (In addition, the
layer is set to label the streets at scales greater than 1:20,000.)
10 Clear the results (but not the flags).
10 Zoom in to the middle school to see it better and to see the road labels appear.
10 Click the Edge Barrier tool and place a barrier on Corral Dr between Park Dr and
Sheridan Lake Rd.
10 Zoom to the previous extent when done.
10 Click Solve.
6. What is the distance of this alternate route? ____________________________
To make it easier to find the way tomorrow morning, make a list of the streets involved in this
path. One way to get a list is to return the path as a selection instead of as a drawing.
11 Choose Selection > Interactive Selection Method from the main toolbar, and make
sure that it is set to Create New Selection.
258
Network Analysis
11 Switch to the List by Selection view in the Table of Contents. Click the toggle
switches to make all layers selectable.
11 Set the Table of Contents view back to List By Drawing Order.
12 Choose Analysis > Options from the Utility Network Analyst toolbar.
12 Click the Results tab.
12 Change the results format to Selection, and uncheck the box for returning junctions.
The edges will contain the street names. Click OK.
12 Clear the results (but not the flags or the barriers).
12 Solve again.
TIP: If no features are selected when solving a trace, check that the selection method is set to
Create New Selection and that the network is one of the selectable layers.
13 Open the Roads attribute table.
13 Click the button to show only the selected records.
7. How many (different) street names are included on this path? ______________________
13 Set the results format back to Drawings in the Analysis > Options menu, and check
the box to return junctions once more. Click OK to close the window.
13 Close the attribute table.
Finally, your other child attends Meadowbrook Elementary School.
Normally she walks to school, but you want to plan a route to take
both children on rainy days. In addition, you have agreed to pick up
her friend who lives on Player Dr. Find a new path including all of
these elements. The Middle School starts earlier than the others, so
you plan to stop there first, pick up the child on Player Dr next, and
then arrive at Meadowbrook. You need to enter the flags in the
order of your planned stops (Fig. 9.19).
14 Use Clear Selected Features from the Selection menu
on the main menu bar to clear the trace.
14 Clear the barriers and the flags.
14 Place an edge flag on Harney Dr.
14 Place an edge flag next to Southwest Middle School.
15 Locate Player Dr using the Find button or Map Tips, and place an edge flag on it.
15 Place an edge flag next to Meadowbrook Elementary School (west and slightly
north of Harney Dr).
15 Solve for the path. When finished, clear the results and the flags.
259
Chapter 9
260
New
restaurant
Barriers
Network Analysis
Zoom
in here
261
Chapter 9
Network Analysis
Note that all of the lines except the loop have blue determinate flow arrows. The loop has the
pink square indeterminate flow symbols. The water could go around the loop in either direction.
Fixing this would require editing the loop to break the connection at one point.
32 Clear the flags and the results.
32 Zoom to the extent of the Water Network group layer.
One useful benefit of using network models is the ability to predict what areas of town will
experience service disruptions due to repairs and outages. The city has been planning to repair a
leaking pipe on St. Patrick St between 6th and 7th Ave. They will need to turn off the flow to the
pipe for several hours, and they want to notify the customers who will be affected.
33 Turn on the Road Network group.
263
Chapter 9
The Trace Upstream tool performs the opposite task, finding the path that water has traveled to
get to a particular location.
35 Clear the flags and the results.
35 Clear the selected features.
35 Use the Find tool to locate and select the streets
N. and S. Grand Vista Ct. They are on the middle of the
west side of the network (Fig. 9.25).
Tracing can also be done with accumulation, for example, to find
the total distance water travels to get to a particular location.
Grand
Vista Ct
264
Network Analysis
There is no downstream equivalent to tracing with accumulation. However, we can use the
selection result option to select the downstream features from a point and determine the total
length of pipe beyond that point. First, we must make sure that Waterlines is a selectable layer.
38 Switch to the List By Selection option on the Table of Contents.
38 Check the selection toggle to make sure that Waterlines is selectable.
38 Switch back to View By Drawing Order.
39 Clear the flags and results.
39 Place a junction flag at the East Rapid gallery.
39 Choose Analysis > Options from the Utility Network Analyst menu.
39 Click the Results tab and change the result format to Selection. Click OK.
39 Change the trace task to Trace Downstream and Solve.
Now that the water lines are selected, it is easy to get their total length.
40 Open the attribute table for the Waterlines layer.
40 Right-click the Shape_Length field and choose Statistics.
11. What is the total length in kilometers of pipe served by this gallery? _______________
40 Close the Statistics window and the attribute table.
40 Clear the selected set.
This is the end of the tutorial.
Close ArcMap. You do not need to save your changes.
SKILL TIP: Learn how to create a geometric network if you have an ArcGIS Standard or
Advanced license (Files and Geodatabases).
265
Chapter 9
Exercises
1. Find the shortest path from Hidden Timbers Dr to Stevens High School. Capture a map
showing the route.
2. What is the distance covered by the route in Exercise 1?
3. What is the shortest alternate route if you want to avoid the before-school congestion on
Park Dr by Southwest Middle School? Capture the map. How long is the new route?
4. The cafeteria at Stevens High School makes daily lunches for several elementary schools in
town. They are delivered in this order: Pinedale, South Canyon, Upper Rapid, Canyon Lake,
Meadowbrook, and Cleghorn. Find the most efficient route to make the deliveries. Capture
the map.
5. You are trucking a load of Canadian hemp from a distributorship on Olde Orchard Rd to a
cowboy rope-making factory on Stacy St. Because of a bizarre technicality in the drug laws,
you can be arrested if the truck is stopped within 250 meters of a school. Find a path to the
destination that avoids this risk. Capture the map.
6. A construction worker accidentally breaks a water line at the intersection of E. St. Patrick St
and Ivy Ave. Create a map showing the area of disrupted service. Capture the map.
7. Of the two water mains leaving the Civic Center gallery, which serves a greater length of
pipes? What is the total pipe length for each main (north and south)?
8. What is the total length of water mains served by the East Rapid gallery versus the Civic
Center gallery? (Do not include laterals or other water line types.)
9. The water main that ends at 5th St and Cathedral Dr/Fairmont Blvd passes through how
many T-valves?
10. Joe did Exercise 9 with Selection as the result format and got 26 selected features. Mary did
the same problem and got 51 selected features. Explain why they got different numbers.
What is the cost in each case?
Challenge Problem
Find a route that goes from Alta Vista Dr to the east end of E. Knollwood St and that travels
ONLY on local streets. (Hint: You cannot ignore the role of junctions in this problem.) Capture
your map.
266
Network Analysis
Skills Reference
Examining network properties
1. In ArcCatalog, rightclick a network in the
catalog list and
choose Properties.
The General tab reports which
feature classes participate in
the network (Fig. 180).
The Connectivity tab shows
any rules that have been
established regarding how the
network elements can connect
(e.g., a three-inch pipe can
connect to a six-inch pipe only
through a coupler junction
feature). Connectivity rules
are not required but are
provided to help maintain
network integrity.
The Weights tab lists weights that have been set up for the network. Weights are created at the
time the network is built, but they may be used during an analysis, if desired.
Performing a trace
1. In ArcMap, click the Add Data button and choose a Name_Net layer, such as Road_Net,
in the geodatabase containing the network. The network and its participating feature
classes will be added to the map.
2. From the main menu, choose Customize > Toolbars > Utility Network Analyst.
3. Select the network to be analyzed, if more than one is available (Fig. 181).
4. Choose the Trace Task to be performed.
5. Click the Flag/Barrier tool and add desired flags and barriers at edges or junctions. For
reliable results, do not mix edge and junction markers; use either but not both.
6. Click the Solve button to perform the trace.
267
Chapter 9
2
3
2
3
4
5
6
268
Network Analysis
TIP: Weights are set up at the time the network is created. If no weights are listed in the dropdown boxes, then the network contains no weights, and none can be used.
Using weight filters
21
4
3
5
4
4
5
6
Fig. 185. Setting weight filters
269
Chapter 9
2. Choose Flow > Properties from the Utility Network Analyst toolbar and click the Arrow
Symbol tab (Fig. 186).
3. Select the flow category to see the symbol used for that category (Determinate,
Indeterminate, or Uninitialized). The symbol for that category will be displayed to the
right.
4. To change the symbol, click on it. The
Symbol Selector appears. Choose the
new symbol, set its size and color
properties, and click OK.
5. Click OK or Apply.
Flags mark locations of interest in a network, and barriers temporarily stop flow.
1. Click the Flag tool drop-down button on the Utility Network Analyst toolbar (Fig. 187)
and select the type of flag or barrier to add
(edge or junction).
Edge
2. Click on a junction to add a junction flag or
flag
barrier. Click along an edge to add an edge
Edge
Junction
flag or barrier.
barrier
flag
Junction
3. To clear flags or barriers, choose Analysis >
barrier
Clear Flags or Analysis > Clear Barriers
from the Utility Network Analyst toolbar.
Fig. 187. Flags and barriers
All flags or barriers are cleared together.
TIP: Flags and barriers will be snapped to the closest feature within the snap tolerance set from
the General tab in the Analysis > Options menu.
TIP: Some tracing tools will not work if the flags or the barriers are of different types. For an
analysis, always use edge flags with edge barriers and junction flags with junction barriers.
270
Network Analysis
Finding a path
By default, the trace will return the path that traverses the fewest number of edges. This path will
not necessarily be the shortest path.
1. Choose the network to trace on.
2. Set the trace task to Find Path.
3. Choose the Junction Flag or Edge Flag tool.
4. Click on the starting location to enter a flag.
5. Click on the end location to enter another flag.
6. Click the Solve button.
TIP: To see the cost (number of edges in the path), look in the lower-left corner of the ArcMap
window before the mouse moves off the Solve button. The cost will vanish once the mouse is
moved. Click Solve again to bring it back.
TIP: Enter more than two flags to visit a series of locations. The stops will be visited in the order
in which they are entered.
Finding the shortest path
To find the shortest path, the network must have a Distance weight based on the length of the
edges. (It may be called something other than Distance.)
1. Choose the network on which to trace.
2. Set the trace task to Find Path.
3. Choose the Junction Flag tool or the Edge Flag tool. Enter the starting, end, and any
intermediate flag locations.
4. Choose Analysis > Options from the Utility Network Analyst toolbar and click the
Weights tab.
5. Set both the along and the against edge weights to Distance (or whatever the weight
name is). Click OK.
6. Click the Solve button.
TIP: The distance in map units along the path will be displayed in the lower-left corner of the
ArcMap window. It will vanish when the mouse is moved. Click Solve again to make it reappear.
271
Chapter 9
272