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.
The network dataset created with this tool is configured with basic default settings. After you run the tool, open the network dataset property pages and configure the settings on your network dataset to support your specific analysis needs.
Once you create and configure the network dataset, it must be built using the Build Network tool.
Network datasets created with this tool cannot currently be configured to support live or historical traffic.
arcpy.na.CreateNetworkDataset(feature_dataset, out_name, source_feature_class_names, elevation_model)
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.
The name of the network dataset to be created. The Target Feature Dataset and its parent geodatabase must not already contain a network dataset with this name.
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.
All source feature classes must reside in the Target Feature Dataset and must not already participate in a geometric network, a utility network, or another network dataset.
Specifies the model to be used to control vertical connectivity in the network dataset.
The new network dataset.
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")
- Basic: Requires Network Analyst
- Standard: Requires Network Analyst
- Advanced: Requires Network Analyst