Incident Class

  • Incident
  • class Esri::ArcGISRuntime::Incident

    A class that represents an incident. More...

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

    This class was introduced in Esri::ArcGISRuntime 100.1.

    Public Functions

    Incident(Esri::ArcGISRuntime::Incident &&other)
    Incident(const Esri::ArcGISRuntime::Incident &other)
    Incident(const Esri::ArcGISRuntime::Point &point)
    Incident()
    Esri::ArcGISRuntime::Incident &operator=(Esri::ArcGISRuntime::Incident &&other)
    Esri::ArcGISRuntime::Incident &operator=(const Esri::ArcGISRuntime::Incident &other)
    ~Incident()
    double addedCost(const QString &attributeName) 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

    Detailed Description

    An Incident is a location that can serve as the starting point or end point of a closest facility analysis, for example, a fire or a traffic accident. Incidents are part of ClosestFacilityParameters which is used as an input to ClosestFacilityTask::solveClosestFacility.

    Member Function Documentation

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

    Move constructor from other Incident.

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

    Copy constructor from other Incident.

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

    Constructor that takes in a point.

    Incident::Incident()

    Default constructor.

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

    Move operator from other Incident.

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

    Assignment operator from other Incident.

    Incident::~Incident()

    Destructor.

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

    Returns the added cost of a given attributeName.

    See also setAddedCost().

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

    Returns the curb approach for this Incident.

    See also setCurbApproach().

    double Incident::currentBearing() const

    Returns с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.

    This function was introduced in Esri::ArcGISRuntime 100.7.

    See also setCurrentBearing().

    double Incident::currentBearingTolerance() const

    Returns the current bearing tolerance of this Incident.

    This function was introduced in Esri::ArcGISRuntime 100.7.

    See also setCurrentBearingTolerance().

    double Incident::distanceToNetworkLocation() const

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

    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().

    int Incident::incidentId() const

    Returns ID of this incident.

    This function was introduced in Esri::ArcGISRuntime 100.6.

    See also setIncidentId().

    bool Incident::isEmpty() const

    Returns true if this Incident is empty.

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

    Returns the LocationStatus of this Incident.

    QString Incident::name() const

    Returns the name of the Incident.

    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.

    See also setNetworkLocation().

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

    Sets the costValue for a given attributeName.

    See also addedCost().

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

    Sets the curbApproach for this Incident.

    See also curbApproach().

    void Incident::setCurrentBearing(double currentBearing)

    Sets the current bearing of this Incident to currentBearing degrees.

    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 currentBearing() and setCurrentBearingTolerance.

    void Incident::setCurrentBearingTolerance(double currentBearingTolerance)

    Sets the current bearing tolerance of this Incident to currentBearingTolerance.

    Valid values are 0 to 180 or NaN.

    This function was introduced in Esri::ArcGISRuntime 100.7.

    See also currentBearingTolerance() and setCurrentBearing.

    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 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 impedanceCutoff().

    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().

    void Incident::setNavigationLatency(double navigationLatency)

    Sets the navigation latency of this Incident to navigationLatency seconds.

    This function was introduced in Esri::ArcGISRuntime 100.7.

    See also navigationLatency().

    void Incident::setNavigationSpeed(double navigationSpeed)

    Sets the navigation speed of this Incident to navigationSpeed meters-per-second.

    This function was introduced in Esri::ArcGISRuntime 100.7.

    See also navigationSpeed().

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

    Sets the networkLocation of this Incident.

    See also networkLocation().

    void Incident::setTargetFacilityCount(int targetFacilityCount)

    Sets the targetFacilityCount 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::defaultTargetFacilityCount.

    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().

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