When you perform a network analysis,Network Analyst must determine the location on the network dataset where each analysis input lies. Network locations are calculated based on several factors, including the geographic locations of the inputs, the settings of the network analysis for which the inputs will be used, and user-specified location settings in the tool or function being used to locate the inputs.
The direction in which a vehicle is moving is an additional factor that can help to accurately determine its location on a network. The graphics below illustrate this principle.
The ArcGIS Network Analyst extension allows you to use this principle to accurately locate points on a network dataset.
GPS devices often calculate bearing in addition to current geographic location. You can use this information when locating points on the network during a network analysis. Doing so results in more accurately placed network analysis objects. This also helps prevent driver confusion because the routes and directions that you generate from these moving points are likely to start from the correct location.
It is common, for instance, to send a truck's current location and bearing via a mobile phone equipped with a GPS receiver to ArcGIS Server where the information is loaded as the first stop in a route analysis. Other stops the truck hasn't visited yet are loaded as well, the route is solved, and the results and directions are sent back to the driver's phone. Using the bearing information during this process helps prevent the truck from starting its route on the wrong street when the truck happens to be near an intersection or an overpass. It also helps the ArcGIS Network Analyst extension verify the direction in which the vehicle is traveling so that the start of the resulting route matches the direction the vehicle is currently traveling.
Bearing and BearingTol fields
The ArcGIS Network Analyst extension can use bearing information from the Bearing and BearingTol fields in network analysis inputs. These fields are described below.
- Bearing—The direction the vehicle or person is moving. The bearing must be specified in degrees and is measured clockwise from true north. Typically, values are between 0 and 360; however, Network Analyst also interprets negative values by subtracting them from 360 degrees.
- BearingTol—Short for bearing tolerance, this field is where you specify the maximum acceptable difference between the heading of a vehicle and a tangent line from the point on a street where Network Analyst attempts to locate the vehicle. In other words, the bearing tolerance is used to determine whether the direction in which a vehicle is moving generally aligns with the underlying road. If they align within the given tolerance, the vehicle is located on that edge; if not, the next nearest eligible edge is evaluated.
The BearingTol units are degrees, and the default value is 30. You can choose any tolerance that is greater than 0 and less than 180.
Network Analyst and the Bearing and BearingTol fields
The following steps provide an overview of how Network Analyst evaluates the bearing fields:
- Network Analyst snaps the point to the nearest edge.
- The bearing tolerance is calculated from the point on the nearest edge to set the minimum and maximum bearing values. This is done for both directions of travel.
- The bearing of the point you are adding is compared with the minimum and maximum allowable bearing values for each of the two travel directions.
- If the bearing falls within the tolerance, the point is added there as a network location. The direction of travel on the road is also determined—it matches the direction of the bearing tolerance that the bearing falls within.
- If the bearing falls outside the tolerance, the point isn't located, and the bearing tolerance of the next nearest eligible edge is evaluated. (Some edges may be ineligible for other reasons, for instance, if you chose not to locate on restricted elements or to exclude all highways. In this case, all edges that are prohibited or highways are skipped.) This process repeats until the point is located on a suitable edge or the point is left unlocated after exceeding the specified snap tolerance.
Use the Bearing and BearingTol fields in your analysis
When performing analysis using network analysis layers and loading points for input classes—such as Stops, Facilities, or Origins—the Add Locations tool automatically uses Bearing and BearingTol fields in your input table. You do not need to use field mapping or do any special configuration. The fields are used if they are present in the input data.
When performing analysis in Python using the Network Analyst module, arcpy.nax, the Bearing and BearingTol fields are explicitly included in the list of supported fields for each analysis input class. To use the fields, map fields from your input into the fields in the input class using the field_mappings parameter of the load method, as you do for any other input fields you want to map.
Keep in mind the following when working with the Bearing and BearingTol fields:
- The Bearing and BearingTol fields in your input data must have a data type of short, long, or double.
- If the mapped input field values for a point are null, the point is located the standard way, that is, without regard to bearing and bearing tolerance.
The series of graphics below and accompanying captions illustrate how Network Analyst processes the Bearing and BearingTol fields.