You are here:
Extensions
>
Network Analyst
>
Performing network analysis
Network analysis layers are made up of components that can be viewed in ArcMap within either the table of contents or the Network Analyst window. In the table of contents, these components are feature layers; when they are in the Network Analyst window, they are .
When a network analysis layer is created, it is empty; the feature classes/network analysis classes don't have any features or records. To perform a network analysis, you need to create or load features and perhaps enter or load tabular data into the network analysis classes. The individual features and records that make up a network analysis class are .
Network analysis layers contain network analysis classes, which contain network analysis objects.
For example, clicking New Route on the Network Analyst toolbar creates a new, empty network analysis layer. In the Network Analyst window, the analysis layer is made up of three network analysis classes: Stops, Routes, and Barriers. Adding a stop at 808 Main Street creates a network analysis object in the Stops class. Similarly, adding a barrier at 657 Third Street inserts a new network analysis object into the Barriers class. Running the route solver creates a new network analysis object in the Routes class.
What are network locations?
A network location is a specific type of network analysis object that is tied to the network and used as input during network analysis. Network locations include stops, barriers, facilities, incidents, origins, destinations, orders, and depots. Unlike other network analysis objects, a network location is a point, positioned on or near the network, and located on the network by four fields in the attribute table: SourceID, SourceOID, PosAlong, and SideOfEdge, which all correspond to a location on a linear feature in the network dataset. When a network location is added, ArcGIS automatically populates these fields.
If you have two points that represent the start and end of a route, you can load them as stops (which are a type of network location) in a route analysis. For example, add two points and load them as stops (1 and 2 in the graphic below) in ArcGIS Network Analyst. Although the points don't fall directly on top of the streets, the closest position on the network is discovered and stored in the stops' four network location attributes. Next, solve to find the best route. The new route begins at the closest position on the network (point a) to the first stop (1) and terminates at the closest point on the network (point b) to the last stop (2).
Stops 1 and 2 are network locations that respectively attach to the network at points a and b. The attribute table of stops shows the fields that store the source feature in the network and the position and side along the network for that feature.
Stop 1 is a network location positioned on the network at point a, which is 47.8 percent along and to the left side of the feature (in relation to the digitized direction) in the Streets feature class with ObjectID 6460. Similarly, Stop 2 is positioned on the network at point b, which is located 45.2 percent along and to the right side of the feature in the Streets feature class with ObjectID 6746 of the Streets source used to create the
network dataset.
A network location (for example, a stop) only references a valid location on the network if its geometry is within the search tolerance of a feature in the network dataset when it was created or moved (or if the four fields were set without using geometry). ArcGIS Network Analyst provides a default search tolerance of 5,000 meters. This search tolerance can be modified to search a smaller or larger area. If no network features are found within the search tolerance, the network location's Status field is set to Unlocated.
To learn more about search tolerance and locating network locations, see the next topic, "Finding network locations."
There are eight kinds of network locations that function as inputs in ArcGIS Network Analyst: stops, barriers, facilities, incidents, origins, destinations, orders, and depots.
-
Stops are locations among which a least-cost route is calculated in a route analysis. You can preset their order or the route solver can set them in a way that minimizes total cost. Furthermore, a start and end stop can be set and the solver will determine the best order for all the other stops.
-
Barriers are locations where the analysis should not traverse. Barriers can be used to represent locations where the analysis can't pass through; for instance, a blocked intersection. You can model road closures or accident sites as barriers if you want the route to avoid that point.
-
Facilities are locations used in closest facility and service area analyses. In closest facility analysis, you search for the closest set of locations (facilities) from other locations (incidents). In service area analysis, the location for which the service area is being calculated is the facility.
-
Incidents are used in closest facility analysis and represent the locations for which the nearest facility is sought.
-
Origins are used in an origin-destination (OD) cost matrix as starting locations from which the route costs to destinations are calculated.
-
Destinations are network locations that are used in an OD cost matrix analysis to generate lines. An OD cost matrix is a table of route costs from origins to destinations.
-
Orders are network locations that are used in vehicle routing problem analysis to represent customers that require some kind of on-site service such as a delivery, pickup, or inspection visits.
-
Depots are network locations that are used in vehicle routing problem analysis to represent starting, ending, or renewal locations for each route that is part of the analysis.
There are two aspects to adding network locations for your analysis:
- Finding network locations on the network
- Setting properties for network locations
Finding network locations
Two main properties are used to find network locations: search tolerance and the snapping environment. These properties can be found on the Analysis Layer Properties dialog box, under the Network Locations tab, below Finding Network Locations.
When you create an analysis layer, you should set your search tolerance and snapping environment. This ensures that the inputs to analysis are located on the network.
Search tolerance
The search tolerance is used by ArcGIS to find the location of a point along the network. It is used to find the nearest network element, which the network references via the SourceID, SourceOID, PosAlong, and SideOfEdge fields. This allows you to use points that are close to the network but not necessarily on it in network analyses. The search tolerance specifies the maximum radius that will be searched. You can modify this search tolerance to suit your data. If the search tolerance is set at a value larger than 50 meters, the search for network features starts at 50 meters. If no network feature is located in the 50 meters, the tolerance is doubled and network features are searched again. This repeats until either a network location is found or the search tolerance value is exceeded.
A smaller search tolerance improves the time it takes to find the network location since fewer features are searched. However, if the point falls outside the search tolerance, it will not be located on the network.
In the figure below, the search tolerance is 50 meters. Only one point is located since the other point isn't within 50 meters of a network feature.
The unlocated point exceeds the search tolerance
In this case, both of these points are located when the search tolerance is set to a larger value (100 meters).
Snapping environment
ArcGIS Network Analyst finds a network element for a point to be located, based on the search tolerance and the snapping environment settings. This is critical in cases where you have more than one network source and you do not know which network element will be closest to the point you add. For example, when placing a stop in a multimodal route, you may want the stop to snap to the nearest street and not to a rail line.
The search tolerance and snapping settings are accessed through the Analysis Layer Properties button

.
The Finding Network Locations section of the Layer Properties dialog box with the Snap To Closest option selected
If a network dataset has more than one source, you can choose which sources should be used to locate the network element. To find the closest network element among multiple sources, click Closest and check at least one of the boxes in the Snap To table for each source you want to snap to. For each source, you can choose if the network location found can be the nearest point along the shape, in the middle, or at the end of the network element. In the example above, the network element is located on the nearest point of the Streets source.
On the other hand, you can also choose to snap to the closest element within a search tolerance for one source and, if an element in that source isn't found, snap to the closest element for a second source, and so on. To do this, click First in the Finding Network Locations section and check boxes in the Snap To table for at least two sources. In the example settings below, ArcGIS Network Analyst looks within the search tolerance for the closest street element and snaps the network location there. However, if a street element isn't found, it looks within the search tolerance for the closest railroad element and snaps there. The unselected sources are not searched. Finally, if neither a street nor railroad element is found, the point is left unlocated.
The Finding Network Locations section with the Snap To First option selected
You can reorder sources in the table by selecting them and using the up and down arrow buttons on the right. The next figure demonstrates how network locations are discovered with these settings.
Snapping to the first element within each class source
Not only are you able to choose the source feature classes that are searched when finding network locations, you can also define a query to restrict the search to a subset of the features. This is useful if you don't want to find features that may be restricted or otherwise unsuited for a network location. For example, if you are using StreetMap network data, streets with a Speed of 1 are considered restricted in both directions when the OneWay network attribute is used. Thus, you may want to specify a where clause of "SPEED > 1" to ensure network locations don't reference a restricted street. As another example, if you define a query that restricts the search to local roads, network locations will only be placed on local roads, ignoring any closer streets of a different road type.
The query builder is accessed by right-clicking a network element in the Finding Network Locations panel and selecting Build Query. The Query Builder dialog box functions like the Select by Attributes dialog box.
Learn more about the Select by Attributes dialog box.
For analysis purposes, network locations need to be treated as if they fall directly on the network, even if the symbols that represent them don't. Network location attributes describe where on a network the object is located. If you want network location symbols to snap to the point their attributes refer to, change the Network Analyst options, which are accessed from the drop-down menu on the Network Analyst toolbar. There you can check Snap to Position Along Network and assign any offset.
Relocating network locations
You may want to relocate network locations after changing the search-tolerance or snap-to settings or you may want to locate a currently unlocated network location. There are two ways of accomplishing this:
- In the Network Analyst window or on the map, you can choose a network location and move it to the desired location using the Select/Move Network Locations button
. If the new location falls within the search tolerance, the symbol of the network location on the map changes from unlocated
to located
.
- Alternatively, you can change the search tolerance to a larger value and relocate the unlocated stops by first selecting them, right-clicking the point feature layer in the Network Analyst window, then clicking Relocate Selected Locations.
Finding network locations using location fields
When a point is located on a network, the reference information is stored in location fields. For a point that is located on an edge, the location fields store the ID of the source class, ObjectID of the feature, the position of the point along the edge, and which side of the edge the point falls on. For a point that is located on a junction, the location fields store the same information; however, since the position along the edge and side of edge is meaningless when referring to junctions, the PosAlong and SideOfEdge fields are set by default to zero and Left Side, respectively.
If you want to locate this point as a network location in another layer or if you exported the network location as a feature class and now are using the exported feature class as input, you can choose to use the location fields instead of the search tolerance to find the network location of the points. ArcGIS automatically identifies the location fields and assigns them to the Location Fields property. However, the default method of finding network locations is spatial proximity using search tolerance. To use location fields, you need to click the Location Fields Match button on the Load Locations dialog box.
Location fields are used when you copy and paste large numbers of network locations between analysis layers. For instance, if you have 100 points that you loaded as stops into a Route analysis layer and want to use the same stops as facilities in analysis layer Closest Facility, it is much faster to copy and paste the locations from the Route analysis layer to the Closest Facility analysis layer instead of loading them from the point feature class using searching via spatial proximity.
Alternatively, you can use the Load Locations dialog box (accessible by right-clicking a network analysis class in the Network Analyst Window), select a network analysis class with network locations in it, then set the Location Position to Use Network Location Fields. Since these points were previously located, the location fields contain all the information required to locate them again. This results in better performance because it reuses the information stored in location fields instead of performing a spatial search.
NOTE: Location fields should only be used between network layers referencing the same network dataset.
Adding network analysis objects
You can use the four methods listed below to add network analysis objects to network analysis classes. These options are limited, however, based on the type of analysis object you are adding.
-
Create Network Location tool: Some analysis objects require a spatial reference when they are created. These include, but are not limited to, network locations. To interactively create these analysis objects, use the Create Network Location tool
. The Select/Move Network Locations tool
can be used to select and change the location of the analysis objects on the map. Selected analysis objects can also be deleted. These two tools are not available when the selected network analysis class in the Network Analyst window is a table.
-
Load Locations tool: Analysis objects can be created from a feature class, feature layer, or table. The results from geocoding a table of addresses are often stored as a point feature class so that the addresses can be loaded into network analysis layers with the Load Locations tool.
-
Add location by address: Instead of loading an entire feature class of geocoded addresses, you may only need to add individual addresses in ArcMap with the Find tool.
After searching for an address, in the Find dialog box you can right-click a candidate location and click Add as Network Location to add the geocoded address as an analysis object. The address is added to the selected network analysis class in the Network Analyst window. For example, if the Stops(0) class is selected, the address is added as a stop. If no analysis class—stops, barriers, facilities, incidents, origins, or destinations—is chosen in the Network Analyst window, then Add as Network Location is unavailable on the shortcut menu. If the analysis class doesn't accept spatial data, Add as Network Location is unavailable as well (see "Add Item command," below).
-
Add Item command: The Add Item tool inserts a new analysis object into the selected analysis class. It is available when the network analysis class doesn't require a geometry.
You can also add network locations in ModelBuilder and the geoprocessing environment using the
Add Locations tool.
Learn more about adding network analysis objects to network analysis classes.
Network location properties
Each kind of network location has properties that can be used in network analysis.
Learn more about network locations used in route analysis.
Learn more about network locations used in service area analysis.
Learn more about network locations used in closest facility analysis.
Learn more about network locations used in OD cost matrix analysis.
Learn more about network locations used in vehicle routing problem analysis.
Setting network location properties
- You can enter and modify network location properties by right-clicking the network location and clicking Properties.
- When multiple network locations are loaded from a feature class or a feature layer, you can use the Location Analysis Properties on the Load Locations dialog box to set the fields used to populate the different properties. Additionally, you can set a default value for the network location. For instance, all network locations can be assigned a default CurbApproach value as Either side of the vehicle. This value applies to locations for which the curb approach has not been explicitly specified. If you have a field that stores values (0, 1, and 2) for either-, right-, and left-side curb approaches, you can choose that field to map to the CurbApproach attribute. This way all facilities obtain their curb approach property values from the field in the feature class. Network locations with a null value for that field are assigned the default value for CurbApproach.
- Some of the fields, such as Name, are identified and assigned automatically. You can create and modify the list of candidate fields for each type of network location to aid in the automatic assignment of fields containing values for location properties. This can be set in the Analysis Layer Properties, under the Network Locations tab, above Finding Network Locations. Multiple candidate fields are separated by semicolons. Field mappings can be saved to or loaded from .xml files for reuse between multiple analysis layers. Additionally, you can save the settings as the default settings by saving them to the file: %InstallDir%\ArcGIS\NetworkAnalyst\NetworkConfiguration\NASolverConfiguration.xml.
(%InstallDir% is the directory in which the product is installed. For instance, on Windows, this usually would be the Program Files directory.)
Note that when running on the Vista operating system or when the installation directory has restricted privileges, it is necessary to run ArcMap as a user with elevated privileges to correctly save the settings to this system file.