Skip To Content ArcGIS for Developers Sign In Dashboard

Incident Class

(Esri::ArcGISRuntime::Incident)

A class that represents an incident. More...

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

Public Functions

Incident()
Incident(const Point &point)
Incident(const Incident &other)
Incident(Incident &&other)
~Incident()
double addedCost(const QString &attributeName) const
CurbApproach curbApproach() const
double distanceToNetworkLocation() const
Point geometry() const
double impedanceCutoff() const
int incidentId() const
bool isEmpty() const
LocationStatus locationStatus() const
QString name() const
NetworkLocation networkLocation() const
void setAddedCost(const QString &attributeName, double costValue)
void setCurbApproach(CurbApproach curbApproach)
void setGeometry(const Point &point)
void setImpedanceCutoff(double impedanceCutoff)
void setIncidentId(int id)
void setName(const QString &name)
void setNetworkLocation(const NetworkLocation &networkLocation)
void setTargetFacilityCount(int targetFacilityCount)
int targetFacilityCount() const
Incident &operator=(const Incident &other)
Incident &operator=(Incident &&other)

Detailed Description

A class that represents an incident.

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

Default constructor.

Incident::Incident(const Point &point)

Constructor that takes in a point.

Incident::Incident(const Incident &other)

Copy constructor from other Incident.

Incident::Incident(Incident &&other)

Move constructor from other Incident.

Incident::~Incident()

Destructor.

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

Returns the added cost of a given attributeName.

See also setAddedCost().

CurbApproach Incident::curbApproach() const

Returns the curb approach for this Incident.

See also setCurbApproach().

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.

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.

LocationStatus Incident::locationStatus() const

Returns the LocationStatus of this Incident.

QString Incident::name() const

Returns the name of the Incident.

See also setName().

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(CurbApproach curbApproach)

Sets the curbApproach for this Incident.

See also curbApproach().

void Incident::setGeometry(const 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::setNetworkLocation(const 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().

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

Assignment operator from other Incident.

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

Move operator from other Incident.


Feedback on this topic?