Associations An association is a relationship between two elements that is reflected in a utility network topology. Learn more enable the modeling of connectivity, containment, and structure attachment An attachment is a file, such as a photograph (for example, a .png file) or a document, that is associated with individual features in a geodatabase or feature layer. Learn more between non-spatial and non-coincident network features. The following table describes the types of relationships between two utility network elements:

AssociationDescriptionGeometry supported
ConnectivityModels the connectivity between two junctions that don’t have geometric coincidence (are not in the same x, y and z location). A transformer may be connected to a fuse, for example.Yes
Structural attachmentModels equipment attached to structures. A transformer bank may be attached to a pole, for example.Yes
ContainmentModels assets that contain other assets. A vault may contain valves and pipes, for example.No

Utility network associations

The following code uses an element for retrieving containment associations, and an extent An extent is a bounding rectangle with points that delineate an area for a map or scene. Learn more for determining attachment and connectivity associations of its contents. Note that as of ArcGIS Enterprise ArcGIS Enterprise is a GIS mapping, analytics, data hosting, and content management product that can be hosted on-premise or in a cloud infrastructure. It includes software, applications, tools, APIs, and services for users and developers. Learn more version 10.8.1 or higher, the results of these method calls may include non-spatial associations.

// Specify a utility element container
var containments = await utilityNetwork.GetAssociationsAsync(containerElement, UtilityAssociationType.Containment);
// Get features for its contents
var contents = from containment in containments select containment.ToElement;
var contentFeatures = await utilityNetwork.GetFeaturesForElementsAsync(contents);
// Get an extent for its contents
var featureGeometries = from content in contentFeatures select content.Geometry;
var contentExtent = GeometryEngine.CombineExtents(featureGeometries);
// Specify an area of interest
var associations = await utilityNetwork.GetAssociationsAsync(contentExtent);

Specifying a utility element A utility element is an entity in a utility network that corresponds to a feature or a part of a feature (for example, a terminal inside a device). Learn more will return all its associations unless the utility element’s terminal A terminal represents logical ports, entries, or exit locations on a single device or junction object within a utility network. Each port can flow in or out. Each device can contain many terminals, all of which can be interconnected. Learn more has been set, which limits the connectivity associations returned.

Specifying an extent will return all its connectivity or structural attachment associations with geometry. The geometry value (polyline) represents the connection relationship between a from element and a to element. You can use the geometry to visualize the association as a graphic A graphic is a visual element composed of a geometry, symbol, and attributes that is displayed on a map or scene. Learn more in the map.

Samples