Global turn evaluator


PurposeThe global turn evaluator is a custom network evaluator for modeling turn delay based on turn angle and the road class of the from, to, and cross roads of a turn. An evaluator editor is also included to allow assigning this custom evaluator to a network dataset attribute in Catalog and then edit its properties with the included editor dialog. A similar pattern can be followed to develop other custom network evaluators and integrate them with Catalog through custom evaluator editors.

Development licensing Deployment licensing
ArcView: Network Analyst ArcView: Network Analyst
ArcEditor: Network Analyst ArcEditor: Network Analyst
ArcInfo: Network Analyst ArcInfo: Network Analyst

Additional Requirements
  • The Network Analyst sample data for the San Francisco region can be used with this sample. The data is found in [Your ArcGIS install folder]\DeveloperKit\SamplesNET\data\SanFranciscoNetwork.
  • If using your own data, the network dataset must support turns and include a cost attribute based on time (e.g. Minutes). You can also incorporate a hierarchy attribute for finer control of turn delays.
  • For more information about building network datasets and performing network analysis in ArcMap, read the "Network dataset concepts" and "Getting started with Network Analyst" topics in the ArcGIS Desktop Help under Extensions > Network Analyst.

How to use

See Using the samples for help on compiling, setting up the debugger, and running the sample (either an exe or dll).

  1. Rebuild the GlobalTurnEvaluators.sln in Microsoft Visual Studio 2005
  2. Open ArcCatalog using an ArcView or higher license and also check out a Network Analyst license to enable network dataset schema updates.
  3. In ArcCatalog, open the properties for the Streets_ND network dataset in the SanFranciscoNetwork folder.
  4. Select the Attributes property page tab. In the attributes list select the "Minutes" attribute and click the "Evaluators…" button to open the evaluators sub-dialog. Note that this evaluator also works with any other network dataset that supports turns and has both a hierarchy attribute and a cost attribute with time units.
  5. Switch to the default values tab in the evaluators sub-dialog and then select the turn element row in the evaluator assignments list. This row represents the global turns for the Minutes attribute.
  6. Right click the turn row and expand the Type sub-menu context item and then click the "global turn" type of evaluator to assign the global turn evaluator.
  7. To modify the properties of the global turn, click the assignment properties button to open the properties dialog for the selected assignment. In the dialog modify the angle ranges using the spin controls. Edit the traversal seconds for the selected turn types in the turn types list and then typing in a new value in the seconds text box. Use -1 for turn types that should not be traversed. If desired you can "Save To Default" in the dialog to use these settings as the default properties for subsequent global turn evaluator assignments. Apply the property page edits to update the network dataset and then close ArcCatalog.
  8. Open the SanFrancisco.mxd map in ArcMap and make sure that a Network Analyst extension license is checked out to permit solving on network analysis layers.
  9. Make the Route layer the active analysis layer. Open the properties and view the analysis settings to make sure that the Minutes attribute is the impedance attribute because the custom global turn evaluator is assigned to that attribute.
  10. Add some stop locations and solve the Route analysis layer. Observe the route is affected by the global turn settings. To adjust the global turn evaluator settings close ArcMap so that a schema lock can be obtained and then go back to step 7.

GlobalTurnEvaluators.sln GlobalTurnEvaluators solution file
GlobalTurnEvaluator/GlobalTurnEvaluator.csproj GlobalTurnEvaluator project File for implementing custom Network Evaluator
GlobalTurnEvaluator/GlobalTurnEvaluator.cs The global turn custom evaluator
GlobalTurnEvaluator/TurnInfo.cs Helper object from maintaining properties of a specific turn type
GlobalTurnEvaluatorUI/GlobalTurnEvaluatorUI.csproj GlobalTurnEvaluatorUI project file for implementing custom Network Evaluator
GlobalTurnEvaluatorUI/GlobalTurnEvaluatorEditor.cs The evaluator editor that enables assignment and editing this evaluator in Catalog
GlobalTurnEvaluatorUI/GlobalTurnEvaluatorDialog.cs The evaluator editor property dialog for editing this evaluator.
Download the C# files
GlobalTurnEvaluators.sln GlobalTurnEvaluators solution file
GlobalTurnEvaluator/GlobalTurnEvaluator.vbproj GlobalTurnEvaluator project File for implementing custom Network Evaluator
GlobalTurnEvaluator/GlobalTurnEvaluator.vb The global turn custom evaluator
GlobalTurnEvaluator/TurnInfo.vb Helper object from maintaining properties of a specific turn type
GlobalTurnEvaluatorUI/GlobalTurnEvaluatorUI.vbproj GlobalTurnEvaluatorUI project file for implementing custom Network Evaluator
GlobalTurnEvaluatorUI/GlobalTurnEvaluatorEditor.vb The evaluator editor that enables assignment and editing this evaluator in Catalog
GlobalTurnEvaluatorUI/GlobalTurnEvaluatorDialog.vb The evaluator editor property dialog for editing this evaluator.
Download the VB.NET files

Download the files for all languages