You are here:
Extensions
>
Network Analyst
>
Network dataset concepts
Each attribute defined in the network must have values for each participating in the network. An evaluator assigns values for the attribute of each source. In ArcView GIS and ARC/INFO, values for attributes were assigned from a field in the shapefile or coverage. In ArcGIS, the field evaluator assigns values to a network attribute from a field for each network source. In addition, there are other types of evaluators that can be used such as constants, field expressions, functions, or VBScript.
The six types of evaluators are described below.
Field evaluator
|
The most common way to assign values for a network attribute is by identifying a single field that will be used to evaluate the network attribute when the network dataset is built. For example, a field evaluator may be used in cases where the value describes a measurement such as meters. |
Field expression evaluator
|
The field evaluator can be modified to take a field expression as the value instead of a single field. In this case, you'll build an expression on the Field Evaluator dialog box. For example, if the units of the network attribute are in meters but the units of source data are in feet, you can create an expression to translate the feet into meters when the network dataset is built. |
Constant evaluator
|
Attributes can be assigned a constant value. The value can be numeric (0, 1, 2) for cost, descriptor, and hierarchy attributes, or a Boolean expression (Traversable or Restricted) for a restriction attribute. |
Function evaluator
|
The function evaluator calculates attribute values by performing a multiplicative or logical function on another attribute value or parameter value. For numeric attribute types, the values are derived from an expression that multiplies the value of another attribute by some value. For example: DriveTime * 1.25. For Boolean attribute types, the values are derived from an expression that compares another attribute value to a parameter value. For example: MaxHeight < VehicleHeight.
NOTE: Since the function evaluator is new in ArcGIS 9.3, using it in your network dataset will make your network dataset unusable in previous ArcGIS releases.
|
Global turn delay evaluator
|
The global turn delay evaluator assigns a cost value for transitioning between two edge elements based on the deflection angle between the two edges and the hierarchy attribute value of each edge. For example, it may take longer to make a left turn from a local road onto a secondary road than it does to go straight through an intersection on a secondary road. Unlike other evaluators, the global turn delay evaluator can only be assigned as the default evaluator for turn elements.
Learn more about establishing global turns.
NOTE: Since the global turn delay evaluator is new in ArcGIS 9.3, using it in your network dataset will make your network dataset unusable in previous ArcGIS releases.
|
VBScript evaluator
|
Attributes can be assigned from the result of the execution of VBScript. This provides a way to model complex attributes. Unlike other evaluators, the VBScript evaluator does not assign values when a network is built. Instead, it assigns values when a particular network analysis requires the use of that attribute. If the values of an attribute change constantly, the use of a VBScript evaluator can ensure the use of updated attributes for network analysis.
NOTE: Since the VBScript evaluator calculates its values at the time of analysis, this evaluator can affect the analysis performance.
|
Every junction source and every turn source requires one evaluator. Every edge source requires two—one for each direction of the edge.
A default evaluator can be assigned for edges, junctions, and turns. If an evaluator is not specified for a particular source, the values for that source are assigned by the default evaluator.
To assign an evaluator to a single source, you will
- Select the source for which the evaluator must be assigned.
- Choose an evaluator type such as Field, Constant, Function, or VBScript.
- Specify the value to be assigned to the network attribute.
If the values are derived from a field, the field will be selected from a drop-down menu. If the values are to be calculated based on a field expression, set evaluator type as Field and press F12 on your keyboard to bring up the Field Evaluators dialog box. Alternatively, you can right-click the source on the Evaluators dialog box and choose Properties from the Value menu to open the Field Evaluators dialog box.
Evaluator examples
Assigning values to cost attributes
For the network attribute DriveTime, the evaluator for the streets network source is a field type. The field FT_Minutes contains values for the network attribute in the from–to direction for the streets source. Similarly, values for the to–from direction of the streets source are assigned from the field TF_Minutes.
In this example, the other edge sources in this network are transit edges and do not have a drive time. Hence, they can be assigned a constant value of -1.
Alternatively, cost attributes can be derived from another cost attribute by using the function evaluator. For example, an attribute that models the travel times of slow vehicles can use the function evaluator to reference an attribute that models normal travel times and multiply it by a slowdown factor.
Assigning values to restrictions
Restriction attributes have a Boolean data type. Since a source element can be either restricted or traversable, it can be assigned a constant (restricted or traversable).
Alternatively, restriction attributes can be derived using the function evaluator to compare another attribute to a parameter value. For example, an attribute that models vehicle height restrictions can use the function evaluator to compare the height limit of a road to the vehicle's actual height stored in an attribute parameter. When the expression evaluates to true, the road is restricted; when the expression evaluates to false, the road is traversable. The exception to this rule is that anytime either of the operands (MaxHeight or Vehicle Height) has a value of zero, the expression always evaluates as false.
Learn more about using parameters with network attributes.
Finally, restriction attributes can also be assigned from a field in the source feature class. For example, you can use a field expression evaluator to generate Boolean results—if the expression is true, the element is restricted; if not, it is traversable.
When a network dataset is created, Network Analyst searches through all sources for commonly used fields such as Oneway. If it finds a Oneway field in any source, it creates a Oneway network attribute and assigns values for the relevant source based on field expressions.
Below is the expression used for a Oneway restriction attribute in the From-To direction:
Below is the expression used for a Oneway restriction attribute in the To-From direction:
These expressions determine the permitted direction(s) of travel based on the text value in the Oneway field:
- "FT" or "F" = Travel is only permitted in the digitized direction of the line feature (the From-To direction).
- "TF" or "T" = Travel is only permitted against the digitized direction of the line feature (the To-From direction).
- "N" = Travel is not permitted in either direction.
- Any other value = Travel is permitted in both directions.
Assigning hierarchies
Hierarchy in a network dataset can be assigned typically via a field evaluator. If the Streets feature class has a road class attribute (Hierarchy) with values 1, 2, and 3—possibly representing interstates, major roads, and minor roads—the hierarchy attribute can be set using the field evaluator.
The network dataset supports three levels of hierarchy—primary roads, secondary roads, and local roads.
If the source feature class has more than three levels of hierarchy, these levels can be grouped. For example, if the Streets feature class has an integer field Func_Class that has six road classes, where 1 and 2 are interstates and toll roads, 3 and 4 are state highways and major arterial roads, and 5 and 6 are local collectors and feeders, then the Ranges button on the Attributes panel can be used to group road classes 1 and 2 as primary roads, classes 3 and 4 as secondary roads, and 5 and 6 as local roads.
1 |
Interstate |
2 |
Interstate Toll Road |
3 |
State Highway |
4 |
Major Road |
5 |
Local Collectors |
6 |
Local feeders |
Sometimes road class attributes are not easy to assign, such as in the table listed below.
1 |
Interstate |
2 |
Interstate Toll Road |
3 |
State Highway |
4 |
Major Road |
5 |
Local Street |
6 |
Freeway Ramp |
This is similar to the previous example except for the last Func_Class value, Freeway Ramp. Freeway ramps connect freeways and should be placed in the highest rank, along with Func_Class 1 and 2.
It is not possible to use the Ranges button on the Attributes tab in the network dataset properties to group Func_Class 1, 2, and 6 together in the highest rank.
To model this scenario, you need to change the evaluator for the Hierarchy attribute.
Using the field expression evaluator, you can enter a small, prelogic VBScript code that uses the variable "res." Set the value of res to 3 (the lowest rank). Set the following condition: If Func_Class is 1, 2, or 6, assign res a value 1. If Func_Class is 3 or 4, assign res a value of 2. For all other cases, the value remains 3. In the Value box of the field expression evaluator, enter "res".
This ensures that all elements with Func_Class 1, 2, or 6 are assigned a hierarchy value of 1; all elements with Func_Class 3 or 4 are assigned a hierarchy value of 2; and all others (namely, elements with Func_Class = 5) are assigned a hierarchy value of 3. The Ranges button on the Attributes panel is set to work with three hierarchy ranks.