Create Geometric Network (Data Management)

License Level:BasicStandardAdvanced

Summary

Creates a geometric network in a geodatabase using the specified feature classes, role for each feature class, and the specified weights with weight associations.

Usage

Syntax

CreateGeometricNetwork_management (in_feature_dataset, out_name, in_source_feature_classes, {snap_tolerance}, {weights}, {weight_associations}, {z_snap_tolerance}, {preserve_enabled_values})
ParameterExplanationData Type
in_feature_dataset

The feature dataset in which the geometric network will be created. In an enterprise geodatabase, the feature dataset and feature classes that will participate in the geometric network cannot be versioned.

Feature Dataset
out_name

The name of the geometric network to be created.

String
in_source_feature_classes
[[feature_class_name, role, source_or_sink],...]

The input feature classes to be added to the geometric network and the role the feature class should play in the geometric network. Roles can be:

  • SIMPLE_JUNCTION—The only option for point feature classes.
  • SIMPLE_EDGE—Used for line feature classes and only allows resources to flow from one end of the edge and out the other end.
  • COMPLEX_EDGE—Used for line feature classes and allows resources to be siphoned off along the length of the edge.

For each simple junction feature class, whether it will participate in flow direction with Sources and Sinks.

  • YES—Simple junction feature class will act as a source or a sink for establishing flow direction.
  • NO—Simple junction feature class will not act as a source or a sink for establishing flow direction.

Value Table
snap_tolerance
(Optional)

The snapping tolerance to be set on the geometric network. The larger the value, the more likely vertices will be to snap together. The default value is empty, which means that no snapping will be performed during geometric network creation. The snapping performed during geometric network creation cannot be undone.

Double
weights
[[weight_name, type, bitgate_size],...]
(Optional)

Weights are the cost of traveling along an edge in a network. For example, in a water network, a weight can be the length of the pipe. Indicate the weight name, weight type, and for bitgate weights, the size. The type of the weight determines which feature class fields can be associated with the weight. Types can be one of the following:

  • Integer—Can be associated with fields of type Short Integer or Long Integer.
  • Single—Can be associated with fields of type Float.
  • Double—Can be associated with fields of type Float or Double.
  • Bitgate—Can be associated with fields of type Short Integer or Long Integer. Only values from 0 to 31 are supported.

Value Table
weight_associations
[[feature_class_name, field, weight_name],...]
(Optional)

Specifies the weight associations for each field and feature class. When adding a new network weight, it must be associated with a field in a feature class which will provide the values to determine the weight for the features.

Value Table
z_snap_tolerance
(Optional)

The snapping tolerance to be set on the geometric network with z-coordinate based snapping. The larger the value, the more likely vertices will be to snap together. The default value is empty which means that no snapping will be performed during geometric network creation, and the geometric network will not support Zs. A value of zero indicates that no snapping will be performed during the geometric network creation, but the geometric network will support Zs.

Double
preserve_enabled_values
(Optional)

Specifies whether to preserve the values in any existing enabled fields or whether the values should be reset to their default value of True.

  • PRESERVE_ENABLEDValid values (either True or False) in the existing enabled fields are preserved. This is the default.
  • NO_PRESERVE_ENABLED Valid values (either True or False) in the existing enabled fields are not preserved.
Boolean

Code Sample

CreateGeometricNetwork example (stand-alone script)

The following Python window script demonstrates how to use the CreateGeometricNetwork function in immediate mode to create a geometric with six feature classes, one weight associated with two of those classes and a snapping tolerance.

# Import arcpy module
import arcpy

# Local variables:
Water = "C:/arcgis/ArcTutor/BuildingaGeodatabase/Montgomery.gdb/Water"

# Process: Create Geometric Network
arcpy.CreateGeometricNetwork(Water, "Water_Net", "Distribmains COMPLEX_EDGE NO;Fittings SIMPLE_JUNCTION NO;Hydrants SIMPLE_JUNCTION NO;Sysvalves SIMPLE_JUNCTION NO;Tanks SIMPLE_JUNCTION YES;Transmains COMPLEX_EDGE NO", "0.5", "Friction_Factor DOUBLE #", "Distribmains FRICTION_FACTOR Friction_Factor;Transmains FRICTION_FACTOR Friction_Factor", "", "PRESERVE_ENABLED")

Environments

This tool does not use any geoprocessing environments

Related Topics

Licensing Information

ArcGIS for Desktop Basic: No
ArcGIS for Desktop Standard: Yes
ArcGIS for Desktop Advanced: Yes
11/18/2013