ClosestFacilityParameters Class

  • ClosestFacilityParameters
  • class Esri::ArcGISRuntime::ClosestFacilityParameters

    A class that contains settings that are used when solving a ClosestFacilityTask. More...

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

    Public Functions

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

    Detailed Description

    The ClosestFacilityParameters class contains all inputs for the ClosestFacilityTask, as well as settings such as the impedance attribute, accumulate and restriction attributes, backtrack (u-turn) policy, etc.

    See also ClosestFacilityTask::createDefaultParametersAsync.

    Member Function Documentation

    ClosestFacilityParameters::ClosestFacilityParameters()

    Default constructor.

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

    Copy constructor from other ClosestFacilityParameters.

    ClosestFacilityParameters::ClosestFacilityParameters(Esri::ArcGISRuntime::ClosestFacilityParameters &&other)

    Move constructor from other ClosestFacilityParameters.

    ClosestFacilityParameters::~ClosestFacilityParameters()

    Destructor.

    QStringList ClosestFacilityParameters::accumulateAttributeNames() const

    Returns the accumulate attribute names.

    The accumulate attribute names e.g. "Minutes", "Miles", etc. Accumulate attributes are useful when more information other than the default impedance attribute is required.

    See also setAccumulateAttributeNames().

    void ClosestFacilityParameters::clearFacilities()

    Clears the facilities.

    Clears facilities that were set by setFacilities(const QList<Esri::ArcGISRuntime::Facility*>&) or setFacilities(Esri::ArcGISRuntime::ArcGISFeatureTable*, const Esri::ArcGISRuntime::QueryParameters&).

    void ClosestFacilityParameters::clearIncidents()

    Clears the incidents.

    Clears incidents that were set by setIncidents(const QList<Esri::ArcGISRuntime::Incident*>&) or setIncidents(Esri::ArcGISRuntime::ArcGISFeatureTable*, const Esri::ArcGISRuntime::QueryParameters&).

    void ClosestFacilityParameters::clearPointBarriers()

    Clears the point barriers.

    Clears point barriers that were set by setPointBarriers(const QList<Esri::ArcGISRuntime::PointBarrier>&) or setPointBarriers(Esri::ArcGISRuntime::ArcGISFeatureTable*, const Esri::ArcGISRuntime::QueryParameters&).

    void ClosestFacilityParameters::clearPolygonBarriers()

    Clears the polygon barriers.

    Clears polygon barriers that were set by setPolygonBarriers(const QList<Esri::ArcGISRuntime::PolygonBarrier*>&) or setPolygonBarriers(Esri::ArcGISRuntime::ArcGISFeatureTable*, const Esri::ArcGISRuntime::QueryParameters&).

    void ClosestFacilityParameters::clearPolylineBarriers()

    Clears the polyline barriers.

    Clears polyline barriers that were set by setPolylineBarriers(const QList<Esri::ArcGISRuntime::PolylineBarrier*>&) or setPolylineBarriers(Esri::ArcGISRuntime::ArcGISFeatureTable*, const Esri::ArcGISRuntime::QueryParameters&).

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

    Clones the ClosestFacilityParameters to a new instance.

    Returns a new instance of the current ClosestFacilityParameters.

    This function was introduced in Esri::ArcGISRuntime 200.1.

    double ClosestFacilityParameters::defaultImpedanceCutoff() const

    Returns the default impedance cutoff.

    See also setDefaultImpedanceCutoff.

    int ClosestFacilityParameters::defaultTargetFacilityCount() const

    Returns the default number of target facilities to find.

    See also setDefaultTargetFacilityCount().

    Esri::ArcGISRuntime::UnitSystem ClosestFacilityParameters::directionsDistanceUnits() const

    Returns the directions distance units.

    Describes the unit of measurement for the length of directions. Default value UnitSystem::Metric will be returned on error.

    See also setDirectionsDistanceUnits().

    QString ClosestFacilityParameters::directionsLanguage() const

    Returns the directions language e.g. "en-US".

    The ISO language code of the directions language to be set. If an unsupported language is set, an error will emit at solve time in ClosestFacilityTask::solveClosestFacilityAsync(const Esri::ArcGISRuntime::ClosestFacilityParameters&) method.

    See also setDirectionsLanguage().

    Esri::ArcGISRuntime::DirectionsStyle ClosestFacilityParameters::directionsStyle() const

    Returns the directions style.

    The directions setting to generate directions designed for different kind of applications. Default value DirectionsStyle::Desktop will be returned on error.

    See also setDirectionsStyle().

    bool ClosestFacilityParameters::isEmpty() const

    Returns true if this ClosestFacilityParameters is empty.

    bool ClosestFacilityParameters::isReturnDirections() const

    Returns whether or not turn-by-turn directions for the closest facility routes are to be returned.

    bool ClosestFacilityParameters::isReturnPointBarriers() const

    Returns whether or not to return the point barriers used in the closest facility task.

    bool ClosestFacilityParameters::isReturnPolygonBarriers() const

    Returns whether or not to return the polygon barriers used in the closest facility task.

    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.

    bool ClosestFacilityParameters::isReturnPolylineBarriers() const

    Returns whether or not to return the polyline barriers used in the closest facility task..

    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.

    bool ClosestFacilityParameters::isReturnRoutes() const

    Returns whether or not return routes are to be returned.

    Enabled by default. Can be returned in the event of a successful solve.

    Esri::ArcGISRuntime::SpatialReference ClosestFacilityParameters::outputSpatialReference() const

    Returns the output spatial reference.

    All route's geometries will be returned in this spatial reference in the even of a successful solve.

    See also setOutputSpatialReference().

    Esri::ArcGISRuntime::RouteShapeType ClosestFacilityParameters::routeShapeType() const

    Returns the route shape type.

    The enumeration value for the output shape type e.g. straight line shape, true shape, or no shape. Default value RouteShapeType::None will be returned on error.

    See also setRouteShapeType().

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

    Returns the search where clause from the specified network dataset's source feature class.

    • sourceName - The name of the network dataset's source feature class to retrieve the where clause from.

    See also setSearchWhereClause().

    void ClosestFacilityParameters::setAccumulateAttributeNames(const QStringList &accumulateAttributeNames)

    Sets the accumulateAttributeNames 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 defaultTargetFacilityCount to defaultTargetFacilityCount.

    See also defaultTargetFacilityCount.

    void ClosestFacilityParameters::setDirectionsDistanceUnits(Esri::ArcGISRuntime::UnitSystem directionsDistanceUnits)

    Sets the directionsDistanceUnits to directionsDistanceUnits.

    See also directionsDistanceUnits.

    void ClosestFacilityParameters::setDirectionsLanguage(const QString &directionsLanguage)

    Sets the directionsLanguage to directionsLanguage.

    See also directionsLanguage.

    void ClosestFacilityParameters::setDirectionsStyle(Esri::ArcGISRuntime::DirectionsStyle directionsStyle)

    Sets the directionsStyle to directionsStyle.

    See also directionsStyle.

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

    Sets the facilities.

    The set of facilities loaded as network locations during analysis.

    See also Facility.

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

    Sets the facilities from the features in specified feature table.

    The feature table can be either local or online.

    The feature table must be of geometry type point. Attributes from the feature table are mapped to the properties on the facilities objects generated from the specified feature table. The where clause set in the query parameters will be applied to the feature table. If an online feature table is specified the table will not be queried for features until Solve is called.

    • featureTable - The feature table.
    • queryParameters - The query parameters.

    Sets facilities by importing them from local or remote table.

    See also FeatureTable and QueryParameters.

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

    Sets the incidents.

    The set of incidents loaded as network locations during analysis.

    See also Incident.

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

    Sets the incidents from the features in specified feature table. The feature table can be either local or online.

    The feature table must be of geometry type point. Attributes from the feature table are mapped to the properties on the incidents objects generated from the specified feature table. The where clause set in the query parameters will be applied to the feature table. If an online feature table is specified the table will not be queried for features until Solve is called.

    • featureTable - The feature table.
    • queryParameters - The query parameters.

    Sets incidents by importing them from local or remote table.

    See also FeatureTable and QueryParameters.

    void ClosestFacilityParameters::setOutputSpatialReference(const Esri::ArcGISRuntime::SpatialReference &outputSpatialReference)

    Sets the outputSpatialReference to outputSpatialReference.

    See also outputSpatialReference.

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

    Sets the point barriers.

    See also PointBarrier.

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

    Sets the point barriers from the features in specified feature table.

    The feature table can be either local or online. The feature table must be of geometry type point. Attributes from the feature table are mapped to the properties on the barrier objects generated from the specified feature table. The where clause set in the query parameters will be applied to the feature table. If an online feature table is specified the table will not be queried for features until Solve is called.

    • featureTable - The feature table.
    • queryParameters - The query parameters.

    Sets point barriers by importing them from local or remote table.

    See also FeatureTable and QueryParameters.

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

    Sets the polygon barriers.

    See also PolygonBarrier.

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

    Sets the polygon barriers from the features in specified feature table.

    The feature table can be either local or online. The feature table must be of geometry type polygon. Attributes from the feature table are mapped to the properties on the barrier objects generated from the specified feature table. The where clause set in the query parameters will be applied to the feature table. If an online feature table is specified the table will not be queried for features until Solve is called.

    • featureTable - The feature table.
    • queryParameters - The query parameters.

    Sets polygon barriers by importing them from local or remote table.

    See also FeatureTable and QueryParameters.

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

    Sets the polyline barriers.

    See also PolylineBarrier.

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

    Sets the polyline barriers from the features in specified feature table.

    The feature table can be either local or online. The feature table must be of geometry type polyline. Attributes from the feature table are mapped to the properties on the barrier objects generated from the specified feature table. The where clause set in the query parameters will be applied to the feature table. If an online feature table is specified the table will not be queried for features until Solve is called.

    • featureTable - The feature table.
    • queryParameters - The query parameters.

    Sets polyline barriers by importing them from local or remote table.

    See also FeatureTable and QueryParameters.

    void ClosestFacilityParameters::setReturnDirections(bool returnDirections)

    Sets the returnDirections to returnDirections.

    See also isReturnDirections.

    void ClosestFacilityParameters::setReturnPointBarriers(bool returnPointBarriers)

    Sets the returnPointBarriers to returnPointBarriers.

    See also isReturnPointBarriers.

    void ClosestFacilityParameters::setReturnPolygonBarriers(bool returnPolygonBarriers)

    Sets the returnPolygonBarriers to returnPolygonBarriers.

    See also isReturnPolygonBarriers.

    void ClosestFacilityParameters::setReturnPolylineBarriers(bool returnPolylineBarriers)

    Sets the returnPolylineBarriers to returnPolylineBarriers.

    See also isReturnPolylineBarriers.

    void ClosestFacilityParameters::setReturnRoutes(bool returnRoutes)

    Sets the returnRoutes to returnRoutes.

    See also isReturnRoutes.

    void ClosestFacilityParameters::setRouteShapeType(Esri::ArcGISRuntime::RouteShapeType routeShapeType)

    Sets the routeShapeType to routeShapeType.

    See also routeShapeType.

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

    Sets a search where clause on the specified network dataset's source feature class.

    Only features satisfying the where clause for the specified feature class will be used to locate facilities or incidents on the network during the solve operation. If a where clause is not set all network features are used.

    • sourceName - The name of the network dataset's source feature class the where clause will be applied to.
    • searchWhereClause - The search where clause.

    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(Esri::ArcGISRuntime::StartTimeUsage startTimeUsage)

    Sets the startTimeUsage to startTimeUsage.

    See also startTimeUsage.

    void ClosestFacilityParameters::setTravelDirection(Esri::ArcGISRuntime::TravelDirection travelDirection)

    Sets the travelDirection to travelDirection.

    See also travelDirection.

    void ClosestFacilityParameters::setTravelMode(const Esri::ArcGISRuntime::TravelMode &travelMode)

    Sets the travelMode to travelMode.

    See also travelMode.

    QDateTime ClosestFacilityParameters::startTime() const

    Returns the start time of the route in UTC time.

    See also setStartTime().

    Esri::ArcGISRuntime::StartTimeUsage ClosestFacilityParameters::startTimeUsage() const

    Returns the start time usage.

    Default value StartTimeUsage::DepartureTime will be returned on error.

    See also setStartTimeUsage().

    Esri::ArcGISRuntime::TravelDirection ClosestFacilityParameters::travelDirection() const

    Returns the travel direction for the closest facility computation (to or from facility).

    Default value TravelDirection::FromFacility will be returned on error..

    See also setTravelDirection().

    Esri::ArcGISRuntime::TravelMode ClosestFacilityParameters::travelMode() const

    Returns the travel mode.

    Travel mode that will be used for closest facility's solving. List of supported travel modes can be obtained from ClosestFacilityTaskInfo::travelModes method.

    See also setTravelMode().

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

    Assignment operator from other ClosestFacilityParameters.

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

    Move operator from other ClosestFacilityParameters.

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