Skip To Content ArcGIS for Developers Sign In Dashboard

ClosestFacilityResult Class


The result from a ClosestFacilityTask. More...

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

Public Functions

ClosestFacilityResult(const ClosestFacilityResult &other)
ClosestFacilityResult(ClosestFacilityResult &&other)
QString directionsLanguage() const
QList<Facility> facilities() const
QList<double> facilityCosts(const QString &attributeName, int facilityIndex) const
QList<Incident> incidents() const
bool isEmpty() const
QStringList messages() const
QList<PointBarrier> pointBarriers() const
QList<PolygonBarrier> polygonBarriers() const
QList<PolylineBarrier> polylineBarriers() const
QList<int> rankedFacilityIndexes(int incidentIndex) const
ClosestFacilityRoute route(int facilityIndex, int incidentIndex) const
ClosestFacilityResult &operator=(const ClosestFacilityResult &other)
ClosestFacilityResult &operator=(ClosestFacilityResult &&other)

Detailed Description

The result from a ClosestFacilityTask.

The closest facility result contains all necessary output from a successfully solved closest facility task. A single route can be obtained by providing facility and incident indexes. The result also contains collections of barriers, messages, facilities, and incidents.

Member Function Documentation


Default constructor.

Warning: This is for convenience only and will construct an empty object.

ClosestFacilityResult::ClosestFacilityResult(const ClosestFacilityResult &other)

Copy constructor from other ClosestFacilityResult.

ClosestFacilityResult::ClosestFacilityResult(ClosestFacilityResult &&other)

Move constructor from other ClosestFacilityResult.



QString ClosestFacilityResult::directionsLanguage() const

Returns the language of the resulting route directions.

QList<Facility> ClosestFacilityResult::facilities() const

Returns a list of the facilities used in the ClosestFacilityTask.

QList<double> ClosestFacilityResult::facilityCosts(const QString &attributeName, int facilityIndex) const

Returns total cost value for given attributeName and facilityIndex.

QList<Incident> ClosestFacilityResult::incidents() const

Returns a list of the incidents used in the ClosestFacilityTask.

bool ClosestFacilityResult::isEmpty() const

Returns true if this ClosestFacilityResult is empty.

QStringList ClosestFacilityResult::messages() const

Returns a list of messages about the ClosestFacilityResult.

QList<PointBarrier> ClosestFacilityResult::pointBarriers() const

Returns a list of the point barriers used in the ClosestFacilityTask.

Only applicable if ClosestFacilityParameters::isReturnPointBarriers used in this ClosestFacilityTask is true.

QList<PolygonBarrier> ClosestFacilityResult::polygonBarriers() const

Returns a list of the polygon barriers used in the ClosestFacilityTask.

Only applicable if ClosestFacilityParameters::isReturnPolygonBarriers used in this ClosestFacilityTask is true.

QList<PolylineBarrier> ClosestFacilityResult::polylineBarriers() const

Returns a list of the polyline barriers used in the ClosestFacilityTask.

Only applicable if ClosestFacilityParameters::isReturnPolylineBarriers used in this ClosestFacilityTask is true.

QList<int> ClosestFacilityResult::rankedFacilityIndexes(int incidentIndex) const

Returns an ordered list of facility indexes for a given incidentIndex.

  • incidentIndex - The index of facility.

Returns facility indexes for a given incident where the index is a rank level and the value is a facility index. The first element in the list is the index of the closest facility, the second element is the next closest, etc. Multiple properties can effect the number of facilities returned for each incident:

ClosestFacilityRoute ClosestFacilityResult::route(int facilityIndex, int incidentIndex) const

Returns a route between the specified facility and incident.

  • facilityIndex - The index of facility.
  • incidentIndex - The index of incident.

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

Assignment operator from other ClosestFacilityResult.

ClosestFacilityResult &ClosestFacilityResult::operator=(ClosestFacilityResult &&other)

Move operator from other ClosestFacilityResult.

Feedback on this topic?