Skip To Content

Apply Compression Layout

Summary

Compresses the diagram features toward the middle of the diagram.

Caution:

If you have an open edit session, you must save your edits prior to running this tool. This ensures the diagram reflects the latest changes made to the network topology in the database. If you fail to save your edits, the edits will not be reflected in the diagram.

Note:

Each layout algorithm includes default parameter values. The default parameter values will be used unless otherwise specified. If the input network diagram is based on a template for which this layout has been configured with a different parameter value, that value is used instead.

Usage

  • This layout algorithm compresses the diagram features toward the middle of the diagram while trying to maintain relative positioning. It works from a distance that allows it to build junction groups that are moved as super nodes during the algorithm execution.

  • This algorithm is useful for networks that span thousands of miles and are otherwise difficult to view and understand in their true geographic positions—for example, in the transmission utilities industry.

  • It is typically used on diagrams with containers so the features in the containers are processed as junction groups.

Syntax

ApplyCompressionLayout_un (in_network_diagram_layer, {are_containers_preserved}, {grouping_distance_absolute}, {vertices_removal_rule})
ParameterExplanationData Type
in_network_diagram_layer

The network diagram where the layout will be applied.

Diagram Layer
are_containers_preserved
(Optional)

Specifies how containers will be processed by the Compression layout algorithm.

  • PRESERVE_CONTAINERS The Compression layout algorithm executes on the top graph of the diagram so containers are preserved. This is the default.
  • IGNORE_CONTAINERSThe Compression layout algorithm executes on both content and noncontent features in the diagram.
Boolean
grouping_distance_absolute
(Optional)

The grouping distance is used to determine whether two connected junctions are close enough to be considered part of the same junctions group. A junctions group represents many junctions that are moved as a group during execution. The group may contain both junctions and containers. To group two junctions together, they must also be connected in the diagram by an edge. The default is 20 units in the diagram's coordinate system.

Linear Unit
vertices_removal_rule
(Optional)

How vertices along edges in the diagram will be processed.

  • ALLAll vertices on all edges will be removed from the diagram.
  • OUTERAny edge vertices that are within the detected junctions' groups will be maintained, while edge vertices that are outside will be removed.When there are containers in the diagram that have edges that intersect the container polygons, a vertex is added at the intersection of the edge and container polygon. This is the default.
  • OUTER_EXCEPT_FIRSTAny edge vertices that are within the detected junctions' groups will be maintained, while edge vertices that are outside will be removed.When there are containers in the diagram that have edges that intersect the container polygons, the first (or last) outside vertex is preserved on edges that intersect a container polygon. A vertex is automatically inserted at the intersection of the edges and container polygons.
String

Derived Output

NameExplanationData Type
out_network_diagram_layer

The updated network diagram layer.

Diagram Layer

Code sample

ApplyCompressionLayout example (Python window)

Apply the Compression Layout algorithm to the Temporary Diagram diagram.

import arcpy
arcpy.ApplyCompressionLayout_un("Temporary Diagram", "PRESERVE_CONTAINERS", "20 Feet", "OUTER")

Environments

This tool does not use any geoprocessing environments.

Licensing information

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

Related topics