Incident Class

  • Incident
  • class Esri::ArcGISRuntime::Incident

    A class that represents an incident. More...

    Header: #include <Incident.h>
    Since: Esri::ArcGISRuntime 100.1

    Public Functions

    Incident(const Esri::ArcGISRuntime::Point &point)
    Incident(const Esri::ArcGISRuntime::Incident &other)
    Incident(Esri::ArcGISRuntime::Incident &&other)
    double addedCost(const QString &attributeName) const
    Esri::ArcGISRuntime::Incident clone() const
    Esri::ArcGISRuntime::CurbApproach curbApproach() const
    double currentBearing() const
    double currentBearingTolerance() const
    double distanceToNetworkLocation() const
    Esri::ArcGISRuntime::Point geometry() const
    double impedanceCutoff() const
    int incidentId() const
    bool isEmpty() const
    Esri::ArcGISRuntime::LocationStatus locationStatus() const
    QString name() const
    double navigationLatency() const
    double navigationSpeed() const
    Esri::ArcGISRuntime::NetworkLocation networkLocation() const
    void setAddedCost(const QString &attributeName, double costValue)
    void setCurbApproach(Esri::ArcGISRuntime::CurbApproach curbApproach)
    void setCurrentBearing(double currentBearing)
    void setCurrentBearingTolerance(double currentBearingTolerance)
    void setGeometry(const Esri::ArcGISRuntime::Point &point)
    void setImpedanceCutoff(double impedanceCutoff)
    void setIncidentId(int id)
    void setName(const QString &name)
    void setNavigationLatency(double navigationLatency)
    void setNavigationSpeed(double navigationSpeed)
    void setNetworkLocation(const Esri::ArcGISRuntime::NetworkLocation &networkLocation)
    void setTargetFacilityCount(int targetFacilityCount)
    int targetFacilityCount() const
    Esri::ArcGISRuntime::Incident &operator=(const Esri::ArcGISRuntime::Incident &other)
    Esri::ArcGISRuntime::Incident &operator=(Esri::ArcGISRuntime::Incident &&other)

    Detailed Description

    Incidents also represent locations that can serve as the starting point or ending point of a closest facility analysis, for example, a fire or a traffic accident. The Incident class contains one of location inputs for the ClosestFacilityTask. The ClosestFacilityTask will create a route between facilities and incidents.

    Member Function Documentation


    Default constructor.

    [explicit] Incident::Incident(const Esri::ArcGISRuntime::Point &point)

    Creates an incident instance with point.

    • point - A point.

    Creates an incident.

    Incident::Incident(const Esri::ArcGISRuntime::Incident &other)

    Copy constructor from other Incident.

    Incident::Incident(Esri::ArcGISRuntime::Incident &&other)

    Move constructor from other Incident.



    double Incident::addedCost(const QString &attributeName) const

    Returns the added cost attribute value.

    • attributeName - The name of attribute.

    Returns added cost value for given impedance or accumulate attribute.

    See also setAddedCost().

    [since Esri::ArcGISRuntime 200.1] Esri::ArcGISRuntime::Incident Incident::clone() const

    Clones the Incident to a new instance.

    Returns a new instance of the current Incident.

    This function was introduced in Esri::ArcGISRuntime 200.1.

    Esri::ArcGISRuntime::CurbApproach Incident::curbApproach() const

    Returns the curb approach for this Incident.

    Default value CurbApproach::EitherSide will be returned on error.

    See also setCurbApproach().

    [since Esri::ArcGISRuntime 100.7] double Incident::currentBearing() const

    Returns the сurrent bearing in degrees.

    Current bearing in degrees, measured clockwise from True-North. Typical values are 0 to 360 or NaN, negative values will be subtracted from 360 (e.g. -15 => 345), values greater than 360 will be have 360 subtracted from them (e.g. 385 => 25). For this property to be used the bearing tolerance also has to be set.

    Bearing and bearing tolerance are meant to be used together. If you only set one, then the other is ignored.

    Bearing and bearing tolerance help to disambiguate how to locate incidents. For example, if you are driving on a freeway overpass and you need to reroute, then you would pass in your device compass bearing and a tolerance (say 45 degrees). This information is used to filter out streets that are potentially closer to your device x,y but are heading in the wrong direction (e.g. An underpass street might be closer to the x,y of your device but it is heading in the wrong direction and would be filtered out).

    This function was introduced in Esri::ArcGISRuntime 100.7.

    See also setCurrentBearingTolerance.

    [since Esri::ArcGISRuntime 100.7] double Incident::currentBearingTolerance() const

    Returns the current bearing tolerance of this Incident.

    Valid values are 0 to 180 or NaN.

    This function was introduced in Esri::ArcGISRuntime 100.7.

    See also setCurrentBearingTolerance() and setCurrentBearing.

    double Incident::distanceToNetworkLocation() const

    Returns the distance of this Incident to a network feature in meters.

    The distance to network location in meters that can be populated by closest facility task.

    Returns NaN if the facility has not been located.

    Esri::ArcGISRuntime::Point Incident::geometry() const

    Returns the Point geometry of where this Incident is located.

    See also setGeometry().

    double Incident::impedanceCutoff() const

    Returns the Impedance Cutoff of this Incident.

    For instance, while finding the closest hospitals from the site of an accident, a cutoff value of 15 minutes would mean that the closest facility task would search for the closest hospital within 15 minutes from the facility. If the closest hospital is 17 minutes away, no routes will be returned in the output routes. A cutoff value is especially useful when searching for multiple facilities or incidents. The units for impedance cutoff is based on the value of the TravelMode::impedanceAttributeName(). For example, if TravelMode::impedanceAttributeName() is TravelTime, then impedanceCutoff is specified in minutes.

    See also setImpedanceCutoff().

    [since Esri::ArcGISRuntime 100.6] int Incident::incidentId() const

    Returns the ID of this incident.

    This is a caller supplied foreign key that can be used to associate output incidents with input incidents.

    {ClosestFacilityParameters::setIncidents(Esri::ArcGISRuntime::ArcGISFeatureTable*, const Esri::ArcGISRuntime::QueryParameters&)}, {Esri::ArcGISRuntime::ClosestFacilityResult::incidents} {ClosestFacilityResult::incidents}

    This function was introduced in Esri::ArcGISRuntime 100.6.

    See also setIncidentId() and Esri::ArcGISRuntime::ClosestFacilityParameters::setIncidents().

    bool Incident::isEmpty() const

    Returns true if this Incident is empty.

    Esri::ArcGISRuntime::LocationStatus Incident::locationStatus() const

    Returns the LocationStatus of this Incident.

    Incident location's status that can be populated by closest facility task. Default value LocationStatus::NotLocated will be returned on error.

    QString Incident::name() const

    Returns the name of the Incident.

    Incident's name to be reported in driving directions.

    See also setName().

    Returns the navigation latency in seconds.

    This function was introduced in Esri::ArcGISRuntime 100.7.

    See also setNavigationLatency().

    Returns the navigation speed in meters-per-second.

    This function was introduced in Esri::ArcGISRuntime 100.7.

    See also setNavigationSpeed().

    Esri::ArcGISRuntime::NetworkLocation Incident::networkLocation() const

    Returns the network location of this Incident.

    The incident's location on the network that can be populated by closest facility task. Set to nullptr for resetting a network location.

    See also setNetworkLocation().

    void Incident::setAddedCost(const QString &attributeName, double costValue)

    Sets the added cost.

    • attributeName - The name of attribute.
    • costValue - The added cost.

    Sets added cost value for given impedance or accumulate attribute.

    See also addedCost().

    void Incident::setCurbApproach(Esri::ArcGISRuntime::CurbApproach curbApproach)

    Sets the curbApproach to curbApproach.

    See also curbApproach.

    [since Esri::ArcGISRuntime 100.7] void Incident::setCurrentBearing(double currentBearing)

    Sets the currentBearing to currentBearing.

    This function was introduced in Esri::ArcGISRuntime 100.7.

    See also currentBearing.

    [since Esri::ArcGISRuntime 100.7] void Incident::setCurrentBearingTolerance(double currentBearingTolerance)

    Sets the current bearing tolerance of this Incident to currentBearingTolerance.

    This function was introduced in Esri::ArcGISRuntime 100.7.

    See also currentBearingTolerance.

    void Incident::setGeometry(const Esri::ArcGISRuntime::Point &point)

    Sets the point geometry of where this Incident is located.

    See also geometry().

    void Incident::setImpedanceCutoff(double impedanceCutoff)

    Sets the impedanceCutoff to impedanceCutoff.

    See also impedanceCutoff.

    [since Esri::ArcGISRuntime 100.6] void Incident::setIncidentId(int id)

    Sets the id of this incident.

    This function was introduced in Esri::ArcGISRuntime 100.6.

    See also incidentId.

    void Incident::setName(const QString &name)

    Sets the name of the Incident.

    See also name.

    [since Esri::ArcGISRuntime 100.7] void Incident::setNavigationLatency(double navigationLatency)

    Sets the navigationLatency to navigationLatency.

    This function was introduced in Esri::ArcGISRuntime 100.7.

    See also navigationLatency.

    [since Esri::ArcGISRuntime 100.7] void Incident::setNavigationSpeed(double navigationSpeed)

    Sets the navigationSpeed to navigationSpeed.

    This function was introduced in Esri::ArcGISRuntime 100.7.

    See also navigationSpeed.

    void Incident::setNetworkLocation(const Esri::ArcGISRuntime::NetworkLocation &networkLocation)

    Sets the networkLocation to networkLocation.

    See also networkLocation.

    void Incident::setTargetFacilityCount(int targetFacilityCount)

    Sets the targetFacilityCount to targetFacilityCount.

    See also targetFacilityCount.

    int Incident::targetFacilityCount() const

    Returns the target facility count of this Incident.

    Specifies the number of facilities that need to be found for the incident. A negative value means that the target facility count property is not considered, but the default is used instead. The default value can be obtained from ClosestFacilityTaskInfo::getDefaultTargetFacilityCount().

    See also setTargetFacilityCount().

    Esri::ArcGISRuntime::Incident &Incident::operator=(const Esri::ArcGISRuntime::Incident &other)

    Assignment operator from other Incident.

    Esri::ArcGISRuntime::Incident &Incident::operator=(Esri::ArcGISRuntime::Incident &&other)

    Move operator from other Incident.

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