UtilityAssociation Class

  • UtilityAssociation
  • class Esri::ArcGISRuntime::UtilityAssociation

    A connectivity, containment, or structural attachment association. More...

    Header: #include <UtilityAssociation.h>
    Since: Esri::ArcGISRuntime 100.7
    Inherits: Esri::ArcGISRuntime::Object

    Public Functions

    UtilityAssociation(Esri::ArcGISRuntime::UtilityAssociationType associationType, Esri::ArcGISRuntime::UtilityElement *fromElement, Esri::ArcGISRuntime::UtilityElement *toElement, QObject *parent = nullptr)
    UtilityAssociation(Esri::ArcGISRuntime::UtilityAssociationType associationType, Esri::ArcGISRuntime::UtilityElement *fromElement, Esri::ArcGISRuntime::UtilityElement *toElement, bool isContainmentVisible, QObject *parent = nullptr)
    UtilityAssociation(Esri::ArcGISRuntime::UtilityAssociationType associationType, Esri::ArcGISRuntime::UtilityElement *fromElement, Esri::ArcGISRuntime::UtilityElement *toElement, double fractionAlongEdge, QObject *parent = nullptr)
    virtual ~UtilityAssociation() override
    Esri::ArcGISRuntime::UtilityAssociationType associationType() const
    double fractionAlongEdge() const
    Esri::ArcGISRuntime::UtilityElement *fromElement() const
    Esri::ArcGISRuntime::Geometry geometry() const
    QUuid globalId() const
    bool isContainmentVisible() const
    Esri::ArcGISRuntime::UtilityElement *toElement() const

    Detailed Description

    Associations are an integral part of network topology. Connectivity associations allow connectivity between two junctions that don't have geometric coincidence (are not in the same location). Structural attachment associations allow modeling equipment attached to structures. Containment associations allow modeling containment of features within other features. Network traces make use of associations. Associations are defined using two UtilityElement objects.

    Relevant samples:

    Member Function Documentation

    [since Esri::ArcGISRuntime 200.5] UtilityAssociation::UtilityAssociation(Esri::ArcGISRuntime::UtilityAssociationType associationType, Esri::ArcGISRuntime::UtilityElement *fromElement, Esri::ArcGISRuntime::UtilityElement *toElement, QObject *parent = nullptr)

    Creates an association with the specified type between the specified utility elements.

    • associationType - The type of association between the fromElement and toElement.
    • fromElement - The first participant in the association.
    • toElement - The second participant in the association.
    • parent - The optional parent QObject.

    Use this constructor if the association type does not need to specify a different value for:

    This function was introduced in Esri::ArcGISRuntime 200.5.

    See also UtilityAssociation(Esri::ArcGISRuntime::UtilityAssociationType, Esri::ArcGISRuntime::UtilityElement*, Esri::ArcGISRuntime::UtilityElement*, bool, QObject*) and UtilityAssociation(Esri::ArcGISRuntime::UtilityAssociationType, Esri::ArcGISRuntime::UtilityElement*, Esri::ArcGISRuntime::UtilityElement*, double, QObject*).

    [since Esri::ArcGISRuntime 200.5] UtilityAssociation::UtilityAssociation(Esri::ArcGISRuntime::UtilityAssociationType associationType, Esri::ArcGISRuntime::UtilityElement *fromElement, Esri::ArcGISRuntime::UtilityElement *toElement, bool isContainmentVisible, QObject *parent = nullptr)

    Creates an association with the specified type between the specified utility elements with isContainmentVisible value.

    • associationType - The type of association between the fromElement and toElement.
    • fromElement - The first participant in the association.
    • toElement - The second participant in the association.
    • isContainmentVisible - true if the content in the containment association is visible, false otherwise.
    • parent - The optional parent QObject.

    This constructor is typically used when creating UtilityAssociationType::Containment association.

    This function was introduced in Esri::ArcGISRuntime 200.5.

    See also UtilityAssociation(Esri::ArcGISRuntime::UtilityAssociationType, Esri::ArcGISRuntime::UtilityElement*, Esri::ArcGISRuntime::UtilityElement*, QObject*) and UtilityAssociation(Esri::ArcGISRuntime::UtilityAssociationType, Esri::ArcGISRuntime::UtilityElement*, Esri::ArcGISRuntime::UtilityElement*, double, QObject*).

    [since Esri::ArcGISRuntime 200.5] UtilityAssociation::UtilityAssociation(Esri::ArcGISRuntime::UtilityAssociationType associationType, Esri::ArcGISRuntime::UtilityElement *fromElement, Esri::ArcGISRuntime::UtilityElement *toElement, double fractionAlongEdge, QObject *parent = nullptr)

    Creates an association with the specified type between the specified utility elements with the fractionAlongEdge value.

    • associationType - The type of association between the fromElement and toElement.
    • fromElement - The first participant in the association.
    • toElement - The second participant in the association.
    • fractionAlongEdge - The relative location along the non-spatial edge where the junction is (logically) located.
    • parent - The optional parent QObject.

    This constructor is typically used when creating UtilityAssociationType::JunctionEdgeObjectConnectivityMidspan association.

    This function was introduced in Esri::ArcGISRuntime 200.5.

    See also UtilityAssociation(Esri::ArcGISRuntime::UtilityAssociationType, Esri::ArcGISRuntime::UtilityElement*, Esri::ArcGISRuntime::UtilityElement*, QObject*) and UtilityAssociation(Esri::ArcGISRuntime::UtilityAssociationType, Esri::ArcGISRuntime::UtilityElement*, Esri::ArcGISRuntime::UtilityElement*, bool, QObject*).

    [override virtual] UtilityAssociation::~UtilityAssociation()

    Destructor.

    Esri::ArcGISRuntime::UtilityAssociationType UtilityAssociation::associationType() const

    Returns the UtilityAssociationType of this association.

    [since Esri::ArcGISRuntime 100.10] double UtilityAssociation::fractionAlongEdge() const

    Returns the relative location along the non-spatial edge where the junction is (logically) located.

    If this is a junction to a non-spatial edge connectivity association, this property represents how far the junction is located along the non-spatial edge, from 0.0 (the edge's start point) and 1.0 (the edge's end point).

    If this association represents UtilityAssociationType::JunctionEdgeObjectConnectivityToSide, the value will be 0.0, if UtilityAssociationType::JunctionEdgeObjectConnectivityMidspan, the value will be between 0.0 and 1.0, and if UtilityAssociationType::JunctionEdgeObjectConnectivityFromSide, the value will be 1.0.

    The default value is 0.0.

    This function was introduced in Esri::ArcGISRuntime 100.10.

    Esri::ArcGISRuntime::UtilityElement *UtilityAssociation::fromElement() const

    Returns the first participant in a UtilityAssociation.

    If this is a containment association, this property represents the container. If this is a structural attachment association, this property represents the structure.

    [since Esri::ArcGISRuntime 100.8] Esri::ArcGISRuntime::Geometry UtilityAssociation::geometry() const

    Returns the geometry of this UtilityAssociation.

    This geometry represents the connection between UtilityAssociation::fromElement and UtilityAssociation::toElement. This property is valid only on connectivity and structural attachment of UtilityAssociation objects returned by UtilityNetwork::associationsAsync(const Esri::ArcGISRuntime::Envelope&, QObject*) or UtilityNetwork::associationsAsync(const Esri::ArcGISRuntime::Envelope&, Esri::ArcGISRuntime::UtilityAssociationType, QObject*).

    This function was introduced in Esri::ArcGISRuntime 100.8.

    QUuid UtilityAssociation::globalId() const

    Returns the global ID of the association.

    bool UtilityAssociation::isContainmentVisible() const

    If this UtilityAssociation represents a containment association, returns whether the containment is visible.

    Esri::ArcGISRuntime::UtilityElement *UtilityAssociation::toElement() const

    Returns the second participant in an association.

    If this is a containment association, this property represents the content. If this is a structural attachment association, this property represents the attached item.

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.