Turn Table To Turn Feature Class (Network Analyst)

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.

import arcpy
arcpy.TurnTableToTurnFeatureClass_na("C:/data/delayturns.trn",
                                     "C:/data/SoCal.gdb/Transportation/Streets",
                                     "DelayTurns")
TurnTableToTurnFeatureClass example 2 (Python window)

Convert an ArcView Turn Table to a turn feature class.

import arcpy
arcpy.TurnTableToTurnFeatureClass_na("C:/Data/DelayTurns.dbf",
                                     "C:/Data/SoCal.gdb/Transportation/Streets",
                                     "DelayTurns","C:/Data/nodes.dbf",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 
# Author: ESRI

#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
inTurnTable = "C:/data/DelayTurns.dbf"
refLineFeatures = "Streets"
outTurnFeatureClassName = "DelayTurns"
maxEdges = 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.TurnTableToTurnFeatureClass_na(inTurnTable, refLineFeatures,
                                     outTurnFeatureClassName, "", maxEdges)

print "Script completed successfully."

Environments

Related Topics

Licensing Information

ArcView: Requires Network Analyst
ArcEditor: Requires Network Analyst
ArcInfo: Requires Network Analyst

Published 6/7/2010