ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Create Geometric Network

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

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

  • The feature classes must reside in the same feature dataset as the geometric network.

  • Only point and line feature classes are supported as input. The feature classes cannot participate in another geometric network or other advanced geodatabase dataset such as a topology, network dataset, terrain, or fabric.

  • Connectivity in geometric network is based on the geometric coincidence of features. Ideally, your data should be clean before you build a network. However, if this is not the case, the data may be snapped during the network building process. While the snapping available within the geometric network wizard can help ensure coincidence, it should not be the only solution used. There are other options available for ensuring clean data, such as Topology, which can help clean up your data in preparation for use in a geometric network. The snapping performed during geometric network creation cannot be undone. If the geometric network is deleted, snapped features do not revert to their original locations.

  • When building a geometric network from existing feature classes, certain geometries that are illegal within the geometric network, or conditions that you should be aware of, may be encountered in some of the input feature classes. When this is encountered, a warning message is displayed at the end of the network building process and a table with the name <geometricnetwork_name>_BUILDERR is created in the database containing a record of these errors.

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_ENABLED —Valid 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_management(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

Licensing information

  • ArcGIS for Desktop Basic: No
  • ArcGIS for Desktop Standard: Yes
  • ArcGIS for Desktop Advanced: Yes

Related topics

  • An overview of the Geometric Network toolset
  • About creating geometric networks

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal