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
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.
Learn more about how to create and configure network datasets
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.
Syntax
CreateNetworkDataset(feature_dataset, out_name, source_feature_class_names, elevation_model)
Parameter | Explanation | Data 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 Target Feature Dataset 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 Target Feature Dataset and must not already participate in a geometric network, a utility network, or another network dataset. | String |
elevation_model | Specifies the model to be used to control vertical connectivity in the network dataset. Learn more about vertical connectivity
| String |
Derived Output
Name | Explanation | Data Type |
out_network_dataset | The new network dataset. | Network Dataset |
Code sample
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
Licensing information
- Basic: Requires Network Analyst
- Standard: Requires Network Analyst
- Advanced: Requires Network Analyst