Add Reduce Junction By Attribute Rule (Network Diagram)

Summary

Adds a diagram rule to the rule sequence specified on a diagram template to automatically reduce diagram junctions during diagram buildings. The junctions that will be reduced are queried from a given network junction source class or object table by attributes according to the number of other junctions to which they are connected.

Learn more about the reduction of junctions in diagrams

Caution:

This tool is a configuration and administration tool.

Note:

This tool impacts the consistency of any existing diagrams based on the input diagram template. All of the existing diagrams become inconsistent and open with a consistency warning icon Diagram to update until they are updated.

Usage

  • This tool is not supported when working with a utility network or trace network service. You must use either a utility network or trace network in a file or mobile geodatabase, or a database connection to a utility network or trace network in an enterprise geodatabase. When working with an enterprise geodatabase, the following are requirements:

  • The Reduce Junction rule is used to simplify the diagram graph while preserving the topology.

    You can use this tool to configure the Reduce Junction rule to run by attributes. This means you can configure the reduction of junctions in a given network junction class or object table by filtering the junctions to reduce by their attributes according to the number of junctions they are connected to and, optionally, to particular attributes on their adjacent edges.

  • Starting at ArcGIS Pro 3.4, when working in Utility Network version 7 with a partitioned tier definition and configuring this tool to reduce junctions with three connections or more, you can have the rule consider flow direction based on the digitized direction to identify the single upstream or single downstream junction to which the junction will be reduced. In earlier versions, the upstream and downstream trace operations could only consider flow direction based on the subnetwork controller locations.

Parameters

LabelExplanationData Type
Input Network

The utility network or trace network containing the diagram template that will be modified.

Utility Network; Trace Network
Input Diagram Template

The name of the diagram template that will be modified.

String
Active

Specifies whether the rule will be active when generating and updating diagrams based on the specified template.

  • Checked—The added rule will become active during the generation and update of any diagrams based on the input template. This is the default.
  • Unchecked—The added rule will not become active during the generation or update of any diagrams based on the input template.

Boolean
Junction Source to Reduce

The network junction source class or object table that will be processed. All diagram junctions related to network junctions that belong to this source class or object table are reduction candidates.

Table; Feature Class
Expression
(Optional)

An SQL expression that will be used to select the subset of network junctions from the junction reduction candidates in the diagrams based on the input template. For more information about SQL syntax, see SQL reference for query expressions used in ArcGIS.

SQL Expression
Reduce Junctions With
(Optional)

Specifies the number of junction connections that will be considered for reduction.

  • Maximum two connected junctionsJunctions with two or fewer connections will be considered. In this case, a specific process will be run according to the number of candidate junction connections that will be reduced. This is the default.
  • Minimum three connected junctionsJunctions with three or more connections will be considered. In a network with a hierarchical tier definition, such a junction will be reduced to any other junction it is connected to, except when it is connected to a single junction. In a network with a partitioned tier definition, upstream and downstream traces will be run to determine the single upstream or downstream junction to which it will be reduced.
String
Reduce if unconnected
(Optional)

Specifies whether each unconnected network diagram junction candidate will be reduced. This parameter is only active when the Reduce Junctions With parameter is set to Maximum two connected junctions.

  • Checked—Unconnected network diagram junction candidates will be reduced. Each junction will be removed.
  • Unchecked—Unconnected network diagram junction candidates will not be reduced; they will be kept. This is the default.

Boolean
Reduce if connected to a single junction
(Optional)

Specifies whether each network diagram junction reduction candidate that is connected to a single junction will be reduced. This parameter is only active when the Reduce Junctions With parameter is set to Maximum two connected junctions.

  • Checked—Network diagram junction reduction candidates that are connected to a single junction will be reduced. Each junction and its incident edge will be reduced onto its single connected junction.
  • Unchecked—Network diagram junction reduction candidates that are connected to a single junction will not be reduced; they will be kept. This is the default.

Boolean
Reduce if connected to 2 different junctions
(Optional)

Specifies whether each network diagram junction reduction candidate that is connected to two other junctions will be reduced. This parameter is only active when the Reduce Junctions With parameter is set to Maximum two connected junctions.

  • Checked—Network diagram junction reduction candidates that connect to two other junctions will be reduced. Each junction and its incident edges will be reduced onto a super span edge (the reduction edge). This is the default.
  • Unchecked—Network diagram junction reduction candidates that connect to two other junctions will not be reduced; they will be kept.

Boolean
Edge Attribute Names
(Optional)

The alias of the edge attributes adjacent to the junction reduction candidate.

The junction will be reduced only when all of its adjacent edges have the same values for each specified attribute alias.

String
Description
(Optional)

The description of the rule.

String
Use Digitized Direction

Specifies whether the digitized direction will be used when reducing junctions with three or more connections.

This parameter is only active when the Reduce Junctions With parameter is set to Minimum three connected junctions.

  • Checked—The reduction process will consider flow direction based on the digitized direction to identify the single upstream or single downstream junction to which the junction will be reduced.
  • Unchecked—The reduction process will consider flow direction based on the location of subnetwork controllers to identify the single upstream or single downstream junction to which the junction will be reduced. This is the default.

Boolean

Derived Output

LabelExplanationData Type
Output Network

The updated utility network or trace network.

Utility Network; Trace Network
Output Diagram Template

The name of the diagram template.

String

arcpy.nd.AddReduceJunctionByAttributeRule(in_utility_network, template_name, is_active, junction_source, {where_clause}, {connectivity_options}, {unconnected_junctions}, {one_connected_junction}, {two_connected_junctions}, {edges_attributes}, {description}, use_digitized_direction)
NameExplanationData Type
in_utility_network

The utility network or trace network containing the diagram template that will be modified.

Utility Network; Trace Network
template_name

The name of the diagram template that will be modified.

String
is_active

Specifies whether the rule will be enabled when generating and updating diagrams based on the specified template.

  • ACTIVEThe added rule will become enabled during the generation and update of any diagrams based on the input template. This is the default.
  • INACTIVEThe added rule will not become enabled during the generation or update of any diagrams based on the input template.
Boolean
junction_source

The network junction source class or object table that will be processed. All diagram junctions related to network junctions that belong to this source class or object table are reduction candidates.

Table; Feature Class
where_clause
(Optional)

An SQL expression that will be used to select the subset of network junctions from the junction reduction candidates in the diagrams based on the input template. For more information about SQL syntax, see SQL reference for query expressions used in ArcGIS.

SQL Expression
connectivity_options
(Optional)

Specifies the number of junction connections that will be considered for reduction.

  • MAX_2_CONNECTED_JUNCTIONSJunctions with two or fewer connections will be considered. In this case, a specific process will be run according to the number of candidate junction connections that will be reduced. This is the default.
  • MIN_3_CONNECTED_JUNCTIONSJunctions with three or more connections will be considered. In a network with a hierarchical tier definition, such a junction will be reduced to any other junction it is connected to, except when it is connected to a single junction. In a network with a partitioned tier definition, upstream and downstream traces will be run to determine the single upstream or downstream junction to which it will be reduced.
String
unconnected_junctions
(Optional)

Specifies whether each unconnected network diagram junction candidate will be reduced. This parameter is only enabled when the connectivity_options parameter is set to MAX_2_CONNECTED_JUNCTIONS.

  • REDUCE_UNCONNECTED_JCTUnconnected network diagram junction candidates will be reduced. Each junction will be removed.
  • KEEP_UNCONNECTED_JCTUnconnected network diagram junction candidates will not be reduced; they will be kept. This is the default.
Boolean
one_connected_junction
(Optional)

Specifies whether each network diagram junction reduction candidate that is connected to a single junction will be reduced. This parameter is only enabled when the connectivity_options parameter is set to MAX_2_CONNECTED_JUNCTIONS.

  • REDUCE_JCT_TO_1JCTNetwork diagram junction reduction candidates that are connected to a single junction will be reduced. Each junction and its incident edge will be reduced onto its single connected junction.
  • KEEP_JCT_TO_1JCTNetwork diagram junction reduction candidates that are connected to a single junction will not be reduced; they will be kept. This is the default.
Boolean
two_connected_junctions
(Optional)

Specifies whether each network diagram junction reduction candidate that is connected to two other junctions will be reduced. This parameter is only enabled when the connectivity_options parameter is set to MAX_2_CONNECTED_JUNCTIONS.

  • REDUCE_JCT_TO_2JCTSNetwork diagram junction reduction candidates that connect to two other junctions will be reduced. Each junction and its incident edges will be reduced onto a super span edge (the reduction edge). This is the default.
  • KEEP_JCT_TO_2JCTSNetwork diagram junction reduction candidates that connect to two other junctions will not be reduced; they will be kept.
Boolean
edges_attributes
[edges_attributes,...]
(Optional)

The alias of the edge attributes adjacent to the junction reduction candidate.

The junction will be reduced only when all of its adjacent edges have the same values for each specified attribute alias.

String
description
(Optional)

The description of the rule.

String
use_digitized_direction

Specifies whether the digitized direction will be used when reducing junctions with three or more connections.

This parameter is only enabled when the connectivity_options parameter is set to MIN_3_CONNECTED_JUNCTIONS.

  • USE_DIGITIZED_DIRECTIONThe reduction process will consider flow direction based on the digitized direction to identify the single upstream or single downstream junction to which the junction will be reduced.
  • IGNORE_DIGITIZED_DIRECTIONThe reduction process will consider flow direction based on the location of subnetwork controllers to identify the single upstream or single downstream junction to which the junction will be reduced. This is the default.
Boolean

Derived Output

NameExplanationData Type
out_utility_network

The updated utility network or trace network.

Utility Network; Trace Network
out_template_name

The name of the diagram template.

String

Code sample

AddReduceJunctionByAttributeRule example (stand-alone script)

This sample script adds a Reduce Junction By Attribute rule to the MyTemplate1 template existing for a given network to systematically reduce any electric nonprotective distribution devices—that is, any device that is not a network protector or a switch—that are unconnected or connected to two other junctions in the generated diagrams.

import arcpy
input_Network = "D:/MyProjectLocation/MyDatabaseConnection.sde/MyDatabase.MAP.Electric/MyDatabase.MAP.Electric"
input_DiagramTemplate = "MyTemplate1"
input_JunctionClassToReduce = "D:/MyProjectLocation/MyDatabaseConnection.sde/MyDatabase.MAP.Electric/MyDatabase.MAP.ElectricDistributionDevice"

arcpy.nd.AddReduceJunctionByAttributeRule(input_Network, input_DiagramTemplate, 
                                          "ACTIVE", input_JunctionClassToReduce, 
                                          "ASSETTYPE <> 11 And ASSETTYPE <> 8", 
                                          "MAX_2_CONNECTED_JUNCTIONS", 
                                          "REDUCE_UNCONNECTED_JCT",
                                          "KEEP_JCT_TO_1JCT", "REDUCE_JCT_TO_2JCTS")
AddReduceJunctionByAttributeRule example 2 (stand-alone script)

This sample script adds a Reduce Junction By Attribute rule to the MyTemplate2 template existing for a given network to systematically reduce any electric nonprotective distribution devices when they connect two other junctions and their adjacent edges have the same values for the Asset type and Phases attributes.

import arcpy
input_Network = "D:/MyProjectLocation/MyDatabaseConnection.sde/MyDatabase.MAP.Electric/MyDatabase.MAP.Electric"
input_DiagramTemplate = "MyTemplate2"
input_JunctionClassToReduce = "D:/MyProjectLocation/MyDatabaseConnection.sde/MyDatabase.MAP.Electric/MyDatabase.MAP.ElectricDistributionDevice"
input_Alias1 = "Asset type"
input_Alias2 = "Phases"

arcpy.nd.AddReduceJunctionByAttributeRule(input_Network, input_DiagramTemplate, 
                                          "ACTIVE", input_JunctionClassToReduce, 
                                          "ASSETTYPE <> 11 And ASSETTYPE <> 8", 
                                          "MAX_2_CONNECTED_JUNCTIONS", 
                                          "KEEP_UNCONNECTED_JCT", "KEEP_JCT_TO_1JCT",
                                          "REDUCE_JCT_TO_2JCTS", 
                                          input_Alias1 + ";" + input_Alias2)

Environments

This tool does not use any geoprocessing environments.

Licensing information

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

Related topics