Calculate Cluster Keys (Utility Network)

Summary

Populates the CLUSTERKEY attribute field on all utility network classes with an integer value to facilitate grouping of features and objects in the network topology.

Cluster keys enable analytical operations to be performed more efficiently in the utility network when working with nonspatial junction and edge objects. The cluster keys are consumed by the network topology on enable and can be helpful when running operations that query the network topology, such as a trace.

Usage

Parameters

LabelExplanationData Type
Input Utility Network

The utility network where the cluster keys will be added.

Utility Network; Utility Network Layer
Overwrite
(Optional)

Specifies whether existing cluster key values will be overwritten with new values.

  • Checked—Existing cluster key values will be overwritten for all classes in the specified extent.
  • Unchecked—Existing cluster key values will not be overwritten for classes in the specified extent. This is the default.

Boolean
Extent
(Optional)

The geographical extent that will be used to generate the cluster keys. When no extent is provided, the tool will use the full extent of the utility network.

  • Current Display Extent Map View—The extent will be based on the active map or scene.
  • Draw Extent Square and Finish—The extent will be based on a rectangle drawn on the map or scene.
  • Extent of a Layer Layer—The extent will be based on an active map layer. Choose an available layer or use the Extent of data in all layers option. Each map layer has the following options:

    • All Features Select All—The extent of all features.
    • Selected Features Area from Selected Features—The extent of the selected features.
    • Visible Features Extent Indicator—The extent of visible features.

  • Browse Browse—The extent will be based on a dataset.
  • Intersection of Inputs Intersect—The extent will be the intersecting extent of all inputs.
  • Union of Inputs Union—The extent will be the combined extent of all inputs.
  • Clipboard Paste—The extent can be copied to and from the clipboard.
    • Copy Extent Copy—Copies the extent and coordinate system to the clipboard.
    • Paste Extent Paste—Pastes the extent and coordinate system from the clipboard. If the clipboard does not include a coordinate system, the extent will use the map’s coordinate system.
  • Reset Extent Reset—The extent will be reset to the default value.
Extent

Derived Output

LabelExplanationData Type
Output Utility Network

The updated utility network.

Utility Network

arcpy.un.CalculateClusterKeys(in_utility_network, {in_overwrite_values}, {in_extent})
NameExplanationData Type
in_utility_network

The utility network where the cluster keys will be added.

Utility Network; Utility Network Layer
in_overwrite_values
(Optional)

Specifies whether existing cluster key values will be overwritten with new values for the specified extent.

  • OVERWRITE_VALUESExisting cluster key values will be overwritten for all classes in the specified extent.
  • DO_NOT_OVERWRITE_VALUESExisting cluster key values will not be overwritten for classes in the specified extent. This is the default.
Boolean
in_extent
(Optional)

The geographical extent that will be used to generate cluster keys. When no extent is provided, the tool will use the full extent of the utility network.

  • MAXOF—The maximum extent of all inputs will be used.
  • MINOF—The minimum area common to all inputs will be used.
  • DISPLAY—The extent is equal to the visible display.
  • Layer name—The extent of the specified layer will be used.
  • Extent object—The extent of the specified object will be used.
  • Space delimited string of coordinates—The extent of the specified string will be used. Coordinates are expressed in the order of x-min, y-min, x-max, y-max.
Extent

Derived Output

NameExplanationData Type
out_utility_network

The updated utility network.

Utility Network

Code sample

CalculateClusterKeys example (Python window)

Calculate cluster keys for the entire extent of a utility network named My Utility Network.

import arcpy 
arcpy.un.CalculateClusterKeys('My Utility Network', 'DO_NOT_OVERWRITE_VALUES',
                              '-10210419.36935838 2192709.92528272 -1010791.46945935 2462417.33676915')

Environments

This tool does not use any geoprocessing environments.

Licensing information

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

Related topics