Turn Table To Turn Feature Class (Network Analyst)

License Level:BasicStandardAdvanced

Summary

Converts an ArcView turn table or ArcInfo Workstation coverage turn table to an ArcGIS turn feature class.

Usage

Syntax

TurnTableToTurnFeatureClass_na (in_turn_table, reference_line_features, out_feature_class_name, {reference_nodes_table}, {maximum_edges}, {config_keyword}, {spatial_grid_1}, {spatial_grid_2}, {spatial_grid_3})
ParameterExplanationData Type
in_turn_table

The .dbf or INFO turn table from which the new turn feature class is being created.

INFO tables do not support mixed case path names on Linux and Solaris.

Table View
reference_line_features

The line feature class to which the input turn table refers. The feature class must be a source in a network dataset.

Feature Class
out_feature_class_name

The name of the new turn feature class to create.

String
reference_nodes_table
(Optional)

The nodes.dbf table in the .nws folder containing the original ArcView GIS network in which the input turn table participated.

This parameter is ignored if the input turn table is an INFO table.

If the input turn table is a .dbf table and this parameter is omitted, then U-turns and turns that traverse between edges connected to each other at both ends will not be created in the output turn feature class.

Errors will be reported in an error file written to the directory defined by the TEMP system variable. The full path name to the error file is reported as a warning message.

dBASE Table
maximum_edges
(Optional)

The maximum number of edges per turn in the new turn feature class. The default value is 5. The maximum value is 20.

Long
config_keyword
(Optional)

Specifies the configuration keyword that determines the storage parameters of the output turn feature class. This parameter is used only if the output turn feature class is created in an ArcSDE geodatabase.

String
spatial_grid_1
(Optional)

The Spatial Grid 1, 2, and 3 parameters apply only to file geodatabases and certain ArcSDE geodatabase feature classes. If you are unfamiliar with setting grid sizes, leave these options as 0,0,0 and ArcGIS will compute optimal sizes for you. For more information about this parameter, refer to the Add Spatial Index tool documentation.

Double
spatial_grid_2
(Optional)

Cell size of the second spatial grid. Leave the size at 0 if you only want one grid. Otherwise, set the size to at least three times larger than Spatial Grid 1.

Double
spatial_grid_3
(Optional)

Cell size of the third spatial grid. Leave the size at 0 if you only want two grids. Otherwise, set the size to at least three times larger than Spatial Grid 2.

Double

Code Sample

TurnTableToTurnFeatureClass example 1 (Python window)

Convert an ArcInfo Workstation Turn table to a turn feature class.

turn_table = "C:/Data/delayturns.trn"
network_lines = "C:/Data/SanFrancisco.gdb/Transportation/Streets"
arcpy.na.TurnTableToTurnFeatureClass(turn_table, network_lines, "DelayTurns")
TurnTableToTurnFeatureClass example 2 (Python window)

Convert an ArcView Turn Table to a turn feature class.

turn_table = "C:/Data/DelayTurns.dbf"
network_lines = "C:/Data/SanFrancisco.gdb/Transportation/Streets"
reference_nodes = "C:/Data/nodes.dbf"
arcpy.na.TurnTableToTurnFeatureClass(turn_table, network_lines, "DelayTurns",
                                        reference_nodes, 2)
TurnTableToTurnFeatureClass example 3 (Stand-alone Python script)

The following Python script demonstrates how to use the TurnTableToTurn FeatureClass tool in a stand-alone script.

# Name: TurnTableToTurnFeatureClass_ex03.py
# Description: Converts a Arcview 3.x turn table to a turn feature class
# Requirements: Network Analyst Extension 

#Import system modules
import arcpy
from arcpy import env

#Check out the Network Analyst extension license
arcpy.CheckOutExtension("Network")

#Set environment settings
env.workspace = "C:/Data/SanFrancisco.gdb/Transportation"

#Set local variables
input_turn_table = "C:/Data/DelayTurns.dbf"
ref_line_features = "Streets"
turn_feature_class_name = "DelayTurns"
max_edges = 7

#Convert the ArcView 3.x Turn table to geodatabase turn feature class
#The streets shapefile referred by the turn features has been converted to a
#feature class in the geodatabase.
arcpy.na.TurnTableToTurnFeatureClass(input_turn_table, ref_line_features,
                                     turn_feature_class_name, "", max_edges)

print("Script completed successfully.")

Environments

Related Topics

Licensing Information

ArcGIS for Desktop Basic: Yes
ArcGIS for Desktop Standard: Yes
ArcGIS for Desktop Advanced: Yes
1/20/2015