Create Geometric Network Geodatabase

Summary

Creates a geodatabase and geometric network from a set of input layers that support the web isolation trace. The input data can be reduced with SQL expressions, lines can be split at point locations, orphaned point features are removed, and true curves are densified.

Usage

  • Specify your parameters, run the script, and refresh the Catalog window to find the newly created Python toolbox.

Syntax

arcpy.NOALIAS.CreateGeometricNetworkGDB(feature_classes, output_workspace, output_geodatabase)
ParameterExplanationData Type
feature_classes

The feature classes to copy to the geodatabase. Specify an optional SQL expression to remove features from each class in the database. Optionally, split the lines at point locations. If the disabled or isolation features are midspan on a line, it is recommended that you use them to split the line.

Value Table
output_workspace

The location where the geodatabase will reside.

Workspace
output_geodatabase

The name of the output geodatabase.

String

Code sample

CreateGeometricNetworkGDB example (Python window)

Creates a geodatabase from a set of input layers with a geometric network.

arcpy.gnsol.CreateGeometricNetworkGDB(feature_classes=r"D:/Data/water.gdb/WaterMain # No;D:/Data/water.gdb/waValve # No", output_workspace=r"D:/Output", output_geodatabase="WaterGN")
CreateGeometricNetworkGDB (stand-alone script)

Creates a geodatabase from a set of input layers with a geometric network.

# Name: CreateGeometricNetworkGDB.py
# Description: Creates a geodatabase from a set of input layers with a geometric network designed to support the web 
# isolation trace.  Data can be reduced with SQL expressions, lines can be split at point locations, orphaned point 
# features are removed, true curves are densified.

# Import required modules
import arcpy
toolbox = r'D:/Data/GeometricNetworkTools.pyt'
arcpy.ImportToolbox(toolbox)
# Local Variables
feature_classes = r"D:/Data/water.gdb/WaterMain # No;D:/Data/water.gdb/waValve # No"
output_workspace = r"D:/Output"
output_geodatabase = "WaterGN"
arcpy.gnsol.CreateGeometricNetworkGDB(feature_classes=feature_classes,
                                      output_workspace=output_workspace,
                                      output_geodatabase=output_geodatabase)

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: No
  • Standard: Yes
  • Advanced: Yes
Top