Available with Network Analyst license.
Network analysis objects are the features or records in a network analysis class and serve as input and output for network analysis layers. To perform a network analysis effectively, you need to know what network analysis objects are and how to work with them.
Some network analysis objects are records that provide only tabular data for the analysis. They are only present in the vehicle routing problem analysis layer. Others are features that contain a geographic location as well as tabular data. Yet, most network analysis objects are network locations that have tabular data, a geographic location, and a position in reference to the network dataset. The following section describes network locations in more detail.
A network location is a type of network analysis object that is tied to the network; furthermore, its position on the network is input for the analysis. Some network locations, such as a stop on a route, can be located only at a discrete point on the network; other network locations, such as a line barrier that represents construction, can span a portion of one or more edges.
Point network locations
When a network location is a point, its location on the network is defined by four network fields in the attribute table:
- SourceID: The numeric identifier of the source feature class that the network location is located on.
- SourceOID: The numeric identifier of the source feature.
- PosAlong: The position along the digitized direction of the source line feature. This value is stored as a ratio; however, it is null if the network location references a junction.
- SideOfEdge: The side of the edge in relation to the digitized direction of the line feature. This field is limited to a domain of two values: Right Side (1) and Left Side (2).
The following table lists which network analysis objects can be more precisely defined as network locations. They are grouped by network analysis layer.
|Network analysis layer||Network locations|
OD Cost Matrix
Vehicle routing problem
Example of network locations: route stops
To better understand network location fields, consider the following example. Two points that represent the start and end of a route (1 and 2 in the graphic below) are loaded as stops in a route analysis layer. Although the points don't fall directly on the streets, the closest position on the network is discovered and stored as numeric values in the stops' four network fields. Next, the route analysis is solved to find the best route. The resultant route begins from the closest position on the network to stop 1 (point a) and terminates at the closest point on the network to stop 2 (point b).
From the example above, Stops 1 and 2 are network locations that respectively attach to the network at points a and b. The attribute table below shows their network fields.
The SourceID field identifies the source feature class of the network dataset that the network locations are on—in this case, Streets. SourceOID identifies the ObjectIDs of the particular street features they are located on (6460 and 6746, respectively). PosAlong indicates that stop 1 is positioned 47.8 percent along the source feature, and SideOfEdge specifies it's on the left side of the feature with respect to the digitized direction of the line. Similarly, Stop 2 is positioned 45.2 percent along and on the right side of street 6746.
Network location ranges
When a network location is linear, its location on the network is defined by a single BLOB field: Locations. The information inside the field defines what elements are covered by the object and what portion of each edge element is covered. Accessing and interpreting the information in the BLOB is outside the scope of this document, but it is possible to do if you program against ArcObjects.
The only line-based network analysis objects that can be more precisely defined as network locations are line barriers and polygon barriers.
Classifying polygons as linear locations may initially seem incorrect; however, consider that networks are one-dimensional. Even though polygons are two-dimensional, a network can only make use of the portions of the polygons that overlap the network. Therefore, the ArcGIS Network Analyst extension internally intersects polygons with the network to simplify the polygons into lines, and possibly points, and convert them into network location ranges. Note that, irrespective of how Network Analyst stores the polygons, ArcGIS continues to draw them as polygons in the map display.
Search tolerance and snapping environment
The search tolerance and snapping environment properties help find a place on the network for the network locations that you add or move. These properties are part of the network analysis layer, found on the Network Locations tab of the Layer Properties dialog box.
When you create an analysis layer, you should set its search tolerance and snapping environment if the defaults are not suitable. This ensures that the inputs to analysis are located on the network. These settings are used when you perform the following operations:
- Load locations or Add locations
- Create network locations
- Copy-paste network locations
- Move network locations
- Recalculate location fields
The search tolerance specifies the maximum radius that ArcGIS will search when looking for a network element on which to place a point network location. The default tolerance is 5,000 meters. If a point falls outside the search tolerance, the resulting network location will be unlocated, which means it won't have a position on the network and can't be properly included in the analysis.
In the graphic below, the search tolerance was set to 50 meters when the two points were located. One point was not located, since it was farther than 50 meters from any network features.
In the next graphic, both points are located, because the search tolerance was set to a larger value (100 meters).
Snapping environment for network locations
You might want to locate stops on a specific source feature; for example, you may want to locate on junctions but not on streets, or when placing stops on a multimodal network, you may want them to locate on streets but not on rail lines. You may even want to locate on junctions and, if no junction is found within the search tolerance, locate on the streets.
If a network dataset has more than one source, you can choose which source feature classes should be used to locate a 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 that you want to locate on. For each source, you can choose if the network location should be located on the nearest point along the feature (Shape), in the middle, or at the end of it.
On the other hand, you can choose to snap to the closest element for one source and, if an element in that source isn't found within the search tolerance, 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 the boxes in the Snap To table for at least two sources.
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 the settings from the graphic above.
You change these settings to snap to intersections by only checking a junctions source. If you want network locations to always locate on a source feature that represents company facilities, for instance, you could check that source instead.
Snapping environment with Build Query
You can also define a query to restrict the search to a subset of the features within a source feature class. This is useful if you don't want to find features that may be unsuited for a network location. For example, if you are loading centroids of polygons and don't want to locate on local roads, you can define a query that searches for major roads only.
The query builder is accessed by right-clicking a network source feature class in the Finding Network Locations panel and selecting Build Query.
The Query Builder dialog box functions like the Select by Attributes dialog box.
Exclude restricted portions of the network
By checking this option, network locations are only placed on traversable portions of the network. This prevents placing network locations on elements that you can't reach due to restrictions or barriers.
Snapping environment and network location ranges
For network location ranges like line barriers, the snapping environment determines which source feature classes the network analysis objects will be located on. The search tolerance is ignored, since network location ranges are only located on the elements they overlap.
If you have two source feature classes—Streets and Railroads—and uncheck Railroads, any line or polygon barriers you subsequently add will only locate on roads, even if the barriers cover railroads.
Loading using network locations
When a network location is created, the network location fields are calculated using a spatial search.
If you are loading network locations that were previously located, the location fields contain all the information required to locate them again. Thus, it is possible to copy their network location field values and avoid the relatively slower spatial search.
Network location fields will already exist if you used the features in another network analysis or you ran the Calculate Locations geoprocessing tool.
- Loading network analysis objects in ArcMap
- Loading network analysis objects using a geoprocessing tool
ArcGIS uses location fields by default 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 closest facility analysis layer, it is much faster to copy and paste the locations from the route layer to the closest facility layer than loading them from the point feature class using a spatial search.
Unlocated network locations
A point network location (for example, a stop) only references a valid location on the network if its geometry was within the search tolerance of a source feature in the network dataset when it was created or moved. 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.
Relocating selected 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. The two common ways of accomplishing this are through moving them or recalculating location fields.
Network analysis object properties
The properties of network analysis objects serve different purposes. Property values that you enter function as input to the analysis—this includes the network location fields that are calculated for you when you add or move a network location. Some properties serve as containers for the output of an analysis. So after solving, you can inspect results in output fields. There are also input/output fields that serve both purposes.
You can enter input and inspect output through the attribute tables of network analysis classes or the Properties window of individual network analysis objects.
- What are network analysis layers?
- Creating network analysis objects using Create Network Location
- Creating network analysis objects using Add Item
- Loading network analysis objects in ArcMap
- Loading network analysis objects using a geoprocessing tool
- Snapping network locations with Build Query
- Viewing and editing properties of network analysis objects
- Moving network analysis objects
- Reverse geocoding network locations
- Recalculating location fields
- Updating network analysis objects from graphics