Skip To Content ArcGIS for Developers Sign In Dashboard

ClosestFacilityParameters Class

(Esri::ArcGISRuntime::ClosestFacilityParameters)

Parameters for a ClosestFacilityTask, such as facilities, incidents, barriers, and whether to return directions. More...

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

Public Functions

ClosestFacilityParameters()
ClosestFacilityParameters(const ClosestFacilityParameters &other)
ClosestFacilityParameters(ClosestFacilityParameters &&other)
~ClosestFacilityParameters()
QStringList accumulateAttributeNames() const
void clearFacilities()
void clearIncidents()
void clearPointBarriers()
void clearPolygonBarriers()
void clearPolylineBarriers()
double defaultImpedanceCutoff() const
int defaultTargetFacilityCount() const
UnitSystem directionsDistanceUnits() const
QString directionsLanguage() const
DirectionsStyle directionsStyle() const
bool isEmpty() const
bool isReturnDirections() const
bool isReturnPointBarriers() const
bool isReturnPolygonBarriers() const
bool isReturnPolylineBarriers() const
bool isReturnRoutes() const
SpatialReference outputSpatialReference() const
RouteShapeType routeShapeType() const
QString searchWhereClause(const QString &sourceName) const
void setAccumulateAttributeNames(const QStringList &accumulateAttributeNames)
void setDefaultImpedanceCutoff(double defaultImpedanceCutoff)
void setDefaultTargetFacilityCount(int defaultTargetFacilityCount)
void setDirectionsDistanceUnits(UnitSystem directionsDistanceUnits)
void setDirectionsLanguage(const QString &directionsLanguage)
void setDirectionsStyle(DirectionsStyle directionsStyle)
void setFacilities(const QList<Facility> &facilities)
void setFacilitiesWithFeatureTable(ArcGISFeatureTable *featureTable, const QueryParameters &queryParameters)
void setIncidents(const QList<Incident> &incidents)
void setIncidentsWithFeatureTable(ArcGISFeatureTable *featureTable, const QueryParameters &queryParameters)
void setOutputSpatialReference(const SpatialReference &outputSpatialReference)
void setPointBarriers(const QList<PointBarrier> &pointBarriers)
void setPointBarriersWithFeatureTable(ArcGISFeatureTable *featureTable, const QueryParameters &queryParameters)
void setPolygonBarriers(const QList<PolygonBarrier> &polygonBarriers)
void setPolygonBarriersWithFeatureTable(ArcGISFeatureTable *featureTable, const QueryParameters &queryParameters)
void setPolylineBarriers(const QList<PolylineBarrier> &polylineBarriers)
void setPolylineBarriersWithFeatureTable(ArcGISFeatureTable *featureTable, const QueryParameters &queryParameters)
void setReturnDirections(bool returnDirections)
void setReturnPointBarriers(bool returnPointBarriers)
void setReturnPolygonBarriers(bool returnPolygonBarriers)
void setReturnPolylineBarriers(bool returnPolylineBarriers)
void setReturnRoutes(bool returnRoutes)
void setRouteShapeType(RouteShapeType routeShapeType)
void setSearchWhereClause(const QString &sourceName, const QString &searchWhereClause)
void setStartTime(const QDateTime &startTime)
void setStartTimeUsage(StartTimeUsage startTimeUsage)
void setTravelDirection(TravelDirection travelDirection)
void setTravelMode(const TravelMode &travelMode)
QDateTime startTime() const
StartTimeUsage startTimeUsage() const
TravelDirection travelDirection() const
TravelMode travelMode() const
ClosestFacilityParameters &operator=(const ClosestFacilityParameters &other)
ClosestFacilityParameters &operator=(ClosestFacilityParameters &&other)

Detailed Description

Parameters for a ClosestFacilityTask, such as facilities, incidents, barriers, and whether to return directions.

Facilities, incidents and barriers must have the same spatial reference, but do not need to be reprojected to match the network dataset's spatial reference. For example, the network dataset could be in WKID 4326, and your map, facilities, incidents and barriers could all be in WKID 3857. The ClosestFacilityTask will automatically reproject the facilities, incidents and barriers, and output the ClosestFacilityRoute in whatever output spatial reference is specified.

Note: ClosestFacilityParameters is only default-constructible for convenience. The standard pattern is to retrieve one from the ClosestFacilityTask class so it already contain defaults values necessary for solving closest facility.

See also ClosestFacilityTask::createDefaultParameters.

Member Function Documentation

ClosestFacilityParameters::ClosestFacilityParameters()

Default constructor.

ClosestFacilityParameters::ClosestFacilityParameters(const ClosestFacilityParameters &other)

Copy constructor from other ClosestFacilityParameters.

ClosestFacilityParameters::ClosestFacilityParameters(ClosestFacilityParameters &&other)

Move constructor from other ClosestFacilityParameters.

ClosestFacilityParameters::~ClosestFacilityParameters()

Destructor.

QStringList ClosestFacilityParameters::accumulateAttributeNames() const

Returns the list of network attribute names to be accumulated with the analysis.

See also setAccumulateAttributeNames().

void ClosestFacilityParameters::clearFacilities()

Clears the facilities that have been set on this ClosestFacilityParameters.

void ClosestFacilityParameters::clearIncidents()

Clears the incidents that have been set on this ClosestFacilityParameters.

void ClosestFacilityParameters::clearPointBarriers()

Clears the point barriers that have been set on this ClosestFacilityParameters.

void ClosestFacilityParameters::clearPolygonBarriers()

Clears the polygon barriers that have been set on this ClosestFacilityParameters.

void ClosestFacilityParameters::clearPolylineBarriers()

Clears the polyline barriers that have been set on this ClosestFacilityParameters.

double ClosestFacilityParameters::defaultImpedanceCutoff() const

Returns the default impedance cutoff.

See also setDefaultImpedanceCutoff.

int ClosestFacilityParameters::defaultTargetFacilityCount() const

Returns the default target facility count.

See also setDefaultTargetFacilityCount().

UnitSystem ClosestFacilityParameters::directionsDistanceUnits() const

Returns the units in which the length information will be reported in the route directions.

See also setDirectionsDistanceUnits().

QString ClosestFacilityParameters::directionsLanguage() const

Returns the language of the resulting route directions.

See also setDirectionsLanguage().

DirectionsStyle ClosestFacilityParameters::directionsStyle() const

Returns the style of the resulting route directions.

See also setDirectionsStyle().

bool ClosestFacilityParameters::isEmpty() const

Returns true if this ClosestFacilityParameters is empty.

bool ClosestFacilityParameters::isReturnDirections() const

Returns whether directions are returned with the ClosestFacilityResult.

bool ClosestFacilityParameters::isReturnPointBarriers() const

Returns whether point barriers are returned with the ClosestFacilityResult.

bool ClosestFacilityParameters::isReturnPolygonBarriers() const

Returns whether polygon barriers are returned with the ClosestFacilityResult.

bool ClosestFacilityParameters::isReturnPolylineBarriers() const

Returns whether polyline barriers are returned with the ClosestFacilityResult.

bool ClosestFacilityParameters::isReturnRoutes() const

Returns whether routes are returned with the ClosestFacilityResult.

SpatialReference ClosestFacilityParameters::outputSpatialReference() const

Returns the output spatial reference.

See also setOutputSpatialReference().

RouteShapeType ClosestFacilityParameters::routeShapeType() const

Returns the output shape type for a route.

See also setRouteShapeType().

QString ClosestFacilityParameters::searchWhereClause(const QString &sourceName) const

Returns the search WHERE clause from the specified sourceName.

See also setSearchWhereClause().

void ClosestFacilityParameters::setAccumulateAttributeNames(const QStringList &accumulateAttributeNames)

Sets the list of network attribute names to be accumulated with the analysis to accumulateAttributeNames.

See also accumulateAttributeNames().

void ClosestFacilityParameters::setDefaultImpedanceCutoff(double defaultImpedanceCutoff)

Sets the default impedance cutoff to defaultImpedanceCutoff.

The units for impedance cutoff is based on the value of the TravelMode::impedanceAttributeName. For example, if TravelMode::impedanceAttributeName parameter is TravelTime, the defaultImpedanceCutoff is specified in minutes.

See also defaultImpedanceCutoff().

void ClosestFacilityParameters::setDefaultTargetFacilityCount(int defaultTargetFacilityCount)

Sets the default target facility count to defaultTargetFacilityCount.

See also defaultTargetFacilityCount().

void ClosestFacilityParameters::setDirectionsDistanceUnits(UnitSystem directionsDistanceUnits)

Sets the units in which the length information will be reported in the route directions to directionsDistanceUnits.

See also directionsDistanceUnits().

void ClosestFacilityParameters::setDirectionsLanguage(const QString &directionsLanguage)

Sets the language of the resulting route directions to directionsLanguage.

See also directionsLanguage().

void ClosestFacilityParameters::setDirectionsStyle(DirectionsStyle directionsStyle)

Sets the style of the resulting route directions to directionsStyle.

See also directionsStyle().

void ClosestFacilityParameters::setFacilities(const QList<Facility> &facilities)

Sets the facilities for a ClosestFacilityTask by providing a list of Facility.

void ClosestFacilityParameters::setFacilitiesWithFeatureTable(ArcGISFeatureTable *featureTable, const QueryParameters &queryParameters)

Sets the facilities for a ClosestFacilityTask by providing a featureTable filtered with queryParameters.

void ClosestFacilityParameters::setIncidents(const QList<Incident> &incidents)

Sets the incidents for a ClosestFacilityTask by providing a list of Incident.

void ClosestFacilityParameters::setIncidentsWithFeatureTable(ArcGISFeatureTable *featureTable, const QueryParameters &queryParameters)

Sets the incidents for a ClosestFacilityTask by providing a featureTable filtered with queryParameters.

void ClosestFacilityParameters::setOutputSpatialReference(const SpatialReference &outputSpatialReference)

Sets the spatial reference to outputSpatialReference.

See also outputSpatialReference().

void ClosestFacilityParameters::setPointBarriers(const QList<PointBarrier> &pointBarriers)

Sets the pointBarriers for a ClosestFacilityTask by providing a list of PointBarrier.

void ClosestFacilityParameters::setPointBarriersWithFeatureTable(ArcGISFeatureTable *featureTable, const QueryParameters &queryParameters)

Sets the point barriers for a ClosestFacilityTask by providing a featureTable filtered with queryParameters.

void ClosestFacilityParameters::setPolygonBarriers(const QList<PolygonBarrier> &polygonBarriers)

Sets the polygonBarriers for a ClosestFacilityTask by providing a list of PolygonBarrier.

void ClosestFacilityParameters::setPolygonBarriersWithFeatureTable(ArcGISFeatureTable *featureTable, const QueryParameters &queryParameters)

Sets the polygon barriers for a ClosestFacilityTask by providing a featureTable filtered with queryParameters.

void ClosestFacilityParameters::setPolylineBarriers(const QList<PolylineBarrier> &polylineBarriers)

Sets the polylineBarriers for a ClosestFacilityTask by providing a list of PolylineBarrier.

void ClosestFacilityParameters::setPolylineBarriersWithFeatureTable(ArcGISFeatureTable *featureTable, const QueryParameters &queryParameters)

Sets the polyline barriers for a ClosestFacilityTask by providing a featureTable filtered with queryParameters.

void ClosestFacilityParameters::setReturnDirections(bool returnDirections)

Sets whether directions are returned with the ClosestFacilityResult to returnDirections.

See also isReturnDirections().

void ClosestFacilityParameters::setReturnPointBarriers(bool returnPointBarriers)

Sets whether to return PointBarriers with the ClosestFacilityResult to returnPointBarriers.

Reusing the PointBarriers from the ClosestFacilityResult (as opposed to using the original PointBarriers) can increase the speed of any subsequent Route calculations.

See also isReturnPointBarriers().

void ClosestFacilityParameters::setReturnPolygonBarriers(bool returnPolygonBarriers)

Sets whether polygon barriers are returned with the ClosestFacilityResult to returnPolygonBarriers.

Reusing the PolygonBarriers from the ClosestFacilityResult (as opposed to using the original PolygonBarriers) can increase the speed of any subsequent Route calculations. This is particularly true for complex polygons.

See also isReturnPolygonBarriers().

void ClosestFacilityParameters::setReturnPolylineBarriers(bool returnPolylineBarriers)

Sets whether polyline barriers are returned with the ClosestFacilityResult to returnPolylineBarriers.

Reusing the PolylineBarriers from the ClosestFacilityResult (as opposed to using the original PolylineBarriers) can increase the speed of any subsequent Route calculations. This is particularly true for complex polylines.

See also isReturnPolylineBarriers().

void ClosestFacilityParameters::setReturnRoutes(bool returnRoutes)

Sets whether routes are returned with the ClosestFacilityResult to returnRoutes.

See also isReturnRoutes().

void ClosestFacilityParameters::setRouteShapeType(RouteShapeType routeShapeType)

Sets the output route shape type for a route to routeShapeType.

See also routeShapeType().

void ClosestFacilityParameters::setSearchWhereClause(const QString &sourceName, const QString &searchWhereClause)

Sets the search WHERE clause from the specified sourceName to searchWhereClause.

This filters the potential matches returned from the task based on an expression.

Note: Search WHERE clauses are not supported for online closest facility tasks. They are only supported when solving local closest facility tasks.

See also searchWhereClause().

void ClosestFacilityParameters::setStartTime(const QDateTime &startTime)

Sets the start time of the route in UTC time to startTime.

See also startTime().

void ClosestFacilityParameters::setStartTimeUsage(StartTimeUsage startTimeUsage)

Sets the start time usage to startTimeUsage.

See also startTimeUsage().

void ClosestFacilityParameters::setTravelDirection(TravelDirection travelDirection)

Sets the travel direction (to or away from the facility) property to travelDirection.

See also travelDirection().

void ClosestFacilityParameters::setTravelMode(const TravelMode &travelMode)

Sets the travel mode to travelMode.

See also travelMode().

QDateTime ClosestFacilityParameters::startTime() const

Returns the start time of the route in UTC time.

See also setStartTime().

StartTimeUsage ClosestFacilityParameters::startTimeUsage() const

Returns the start time usage.

See also setStartTimeUsage().

TravelDirection ClosestFacilityParameters::travelDirection() const

Returns the travel direction (to or away from the facility) property.

See also setTravelDirection().

TravelMode ClosestFacilityParameters::travelMode() const

Returns the travel mode.

See also setTravelMode().

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

Assignment operator from other ClosestFacilityParameters.

ClosestFacilityParameters &ClosestFacilityParameters::operator=(ClosestFacilityParameters &&other)

Move operator from other ClosestFacilityParameters.


Feedback on this topic?