Create Network Dataset (Network Analyst)

Summary

Creates a network dataset in an existing feature dataset. The network dataset can be used to perform network analysis on the data in the feature dataset.

Usage

Parameters

LabelExplanationData Type
Target Feature Dataset

The feature dataset where the network dataset will be created. The feature dataset should contain the source feature classes that will participate in the network dataset.

If the feature dataset is in an enterprise geodatabase, the feature dataset and all source feature classes cannot be versioned.

Feature Dataset
Network Dataset Name

The name of the network dataset to be created. The Target Feature Dataset parameter value and its parent geodatabase must not already contain a network dataset with this name.

String
Source Feature Classes

The names of the feature classes to be included in the network dataset as network source features. Specify this parameter as a list of strings.

You must choose at least one line feature class that is not a turn feature class. This line feature class will act as an edge source in the network dataset. You can optionally choose point feature classes to act as junction sources in the network dataset and turn feature classes to act as turn sources.

Learn more about network dataset source feature classes

All source feature classes must reside in the Target Feature Dataset parameter value and must not already participate in a geometric network, a utility network, or another network dataset. Source feature classes cannot have 64-bit object identifier (OID) fields.

String
Elevation Model

Specifies the model that will be used to control vertical connectivity in the network dataset.

Learn more about vertical connectivity

  • Elevation fields Coincident endpoints with the same elevation field values will be considered connected in the network dataset. This is the default.
  • Z coordinatesThe z-coordinate values in the line feature geometry will be used to determine vertical connectivity. Coincident points are considered connected only if they have matching z-coordinate values.
  • No elevation Network dataset connectivity will be determined only by horizontal coincidence.
String

Derived Output

LabelExplanationData Type
Output Network Dataset

The new network dataset.

Network Dataset

arcpy.na.CreateNetworkDataset(feature_dataset, out_name, source_feature_class_names, elevation_model)
NameExplanationData Type
feature_dataset

The feature dataset where the network dataset will be created. The feature dataset should contain the source feature classes that will participate in the network dataset.

If the feature dataset is in an enterprise geodatabase, the feature dataset and all source feature classes cannot be versioned.

Feature Dataset
out_name

The name of the network dataset to be created. The feature_dataset parameter value and its parent geodatabase must not already contain a network dataset with this name.

String
source_feature_class_names
[source_feature_class_names,...]

The names of the feature classes to be included in the network dataset as network source features. Specify this parameter as a list of strings.

You must choose at least one line feature class that is not a turn feature class. This line feature class will act as an edge source in the network dataset. You can optionally choose point feature classes to act as junction sources in the network dataset and turn feature classes to act as turn sources.

Learn more about network dataset source feature classes

All source feature classes must reside in the feature_dataset parameter value and must not already participate in a geometric network, a utility network, or another network dataset. Source feature classes cannot have 64-bit object identifier (OID) fields.

String
elevation_model

Specifies the model that will be used to control vertical connectivity in the network dataset.

Learn more about vertical connectivity

  • ELEVATION_FIELDS Coincident endpoints with the same elevation field values will be considered connected in the network dataset. This is the default.
  • Z_COORDINATESThe z-coordinate values in the line feature geometry will be used to determine vertical connectivity. Coincident points are considered connected only if they have matching z-coordinate values.
  • NO_ELEVATION Network dataset connectivity will be determined only by horizontal coincidence.
String

Derived Output

NameExplanationData Type
out_network_dataset

The new network dataset.

Network Dataset

Code sample

CreateNetworkDataset example 1 (Python window)

Create a network dataset in a feature dataset.

import arcpy
arcpy.CheckOutExtension("network")

arcpy.na.CreateNetworkDataset(r"C:\Data\Network.gdb\Transportation", 
                              "Streets_ND", ["Streets", "Turns"], 
                              "ELEVATION_FIELDS")

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: Requires Network Analyst
  • Standard: Requires Network Analyst
  • Advanced: Requires Network Analyst