RouteParameters Class

  • RouteParameters
  • class Esri::ArcGISRuntime::RouteParameters

    A route parameters object contains parameters for route calculation. More...

    Header: #include <RouteParameters.h>
    Since: Esri::ArcGISRuntime 100.0

    Public Functions

    RouteParameters()
    RouteParameters(const Esri::ArcGISRuntime::RouteParameters &other)
    RouteParameters(Esri::ArcGISRuntime::RouteParameters &&other)
    ~RouteParameters()
    QStringList accumulateAttributeNames() const
    void clearPointBarriers()
    void clearPolygonBarriers()
    void clearPolylineBarriers()
    void clearStops()
    Esri::ArcGISRuntime::RouteParameters clone() const
    Esri::ArcGISRuntime::UnitSystem directionsDistanceUnits() const
    QString directionsLanguage() const
    Esri::ArcGISRuntime::DirectionsStyle directionsStyle() const
    bool isEmpty() const
    bool isFindBestSequence() const
    bool isPreserveFirstStop() const
    bool isPreserveLastStop() const
    bool isReturnDirections() const
    bool isReturnPointBarriers() const
    bool isReturnPolygonBarriers() const
    bool isReturnPolylineBarriers() const
    bool isReturnRoutes() const
    bool isReturnStops() const
    Esri::ArcGISRuntime::SpatialReference outputSpatialReference() const
    Esri::ArcGISRuntime::RouteShapeType routeShapeType() const
    QString searchWhereClause(const QString &sourceName) const
    void setAccumulateAttributeNames(const QStringList &accumulateAttributeNames)
    void setDirectionsDistanceUnits(Esri::ArcGISRuntime::UnitSystem directionsDistanceUnits)
    void setDirectionsLanguage(const QString &directionsLanguage)
    void setDirectionsStyle(Esri::ArcGISRuntime::DirectionsStyle directionsStyle)
    void setFindBestSequence(bool findBestSequence)
    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 setPreserveFirstStop(bool preserveFirstStop)
    void setPreserveLastStop(bool preserveLastStop)
    void setReturnDirections(bool returnDirections)
    void setReturnPointBarriers(bool returnPointBarriers)
    void setReturnPolygonBarriers(bool returnPolygonBarriers)
    void setReturnPolylineBarriers(bool returnPolylineBarriers)
    void setReturnRoutes(bool returnRoutes)
    void setReturnStops(bool returnStops)
    void setRouteShapeType(Esri::ArcGISRuntime::RouteShapeType routeShapeType)
    void setSearchWhereClause(const QString &sourceName, const QString &searchWhereClause)
    void setStartTime(const QDateTime &startTime)
    void setStops(const QList<Esri::ArcGISRuntime::Stop> &stops)
    void setStopsWithFeatureTable(Esri::ArcGISRuntime::ArcGISFeatureTable *featureTable, const Esri::ArcGISRuntime::QueryParameters &queryParameters)
    void setTravelMode(const Esri::ArcGISRuntime::TravelMode &travelMode)
    QDateTime startTime() const
    Esri::ArcGISRuntime::TravelMode travelMode() const
    Esri::ArcGISRuntime::RouteParameters &operator=(const Esri::ArcGISRuntime::RouteParameters &other)
    Esri::ArcGISRuntime::RouteParameters &operator=(Esri::ArcGISRuntime::RouteParameters &&other)

    Detailed Description

    A class that contains settings that are used when solving a RouteTask. The RouteParameters class contains all inputs for the RouteTask, as well as settings such as the impedance attribute, accumulate and restriction attributes, backtrack (u-turn) policy, etc.

    See also RouteTask.

    Member Function Documentation

    RouteParameters::RouteParameters()

    Default constructor.

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

    Copy constructor from other RouteParameters.

    RouteParameters::RouteParameters(Esri::ArcGISRuntime::RouteParameters &&other)

    Move constructor from other RouteParameters.

    RouteParameters::~RouteParameters()

    Destructor.

    QStringList RouteParameters::accumulateAttributeNames() const

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

    See also setAccumulateAttributeNames().

    void RouteParameters::clearPointBarriers()

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

    void RouteParameters::clearPolygonBarriers()

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

    void RouteParameters::clearPolylineBarriers()

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

    void RouteParameters::clearStops()

    Clears the stops that have been set on this RouteParameters.

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

    Clones the RouteParameters to a new instance.

    Returns a new instance of the current RouteParameters.

    This function was introduced in Esri::ArcGISRuntime 200.1.

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

    Returns directions distance text units.

    A directions distance text units. Describes the unit of measurement for the length of directions.

    See also setDirectionsDistanceUnits().

    QString RouteParameters::directionsLanguage() const

    Returns the language of the resulting route directions.

    See also setDirectionsLanguage().

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

    Returns directions style.

    A directions style. The directions setting to generate directions designed for different kind of applications.

    See also setDirectionsStyle().

    bool RouteParameters::isEmpty() const

    Returns true if this RouteParameters is empty.

    bool RouteParameters::isFindBestSequence() const

    Returns whether the analysis should reorder stops to find the optimized route.

    The default is false.

    If the parameter value is false, the analysis returns a route that visits stops in the order you define. The order you define is the order that the stops are encountered in the array of stops in the RouteParameters. For example, the Stop at index zero is first, index 1 is second, and so on. If the parameter value is true, the analysis disregards the order you defined, and finds the best order to visit the stops. You can elect to preserve the first and/or the last stops while allowing the service to reorder intermediary stops by setting setPreserveFirstStop and setPreserveLastStop.

    Note: A value of true causes the analysis to switch from solving a shortest-path problem to a traveling salesperson problem (TSP). Solving a TSP is computer-intensive operation and if using an online subscription-based service (e.g. ArcGIS Online) may incur additional service credits per route.

    bool RouteParameters::isPreserveFirstStop() const

    Returns whether the analysis should preserve the first stop.

    This parameter is applicable only if isFindBestSequence is true.

    bool RouteParameters::isPreserveLastStop() const

    Returns whether the analysis should preserve the last stop.

    This parameter is applicable only if isFindBestSequence is true.

    bool RouteParameters::isReturnDirections() const

    Returns whether directions are returned with the RouteResult.

    bool RouteParameters::isReturnPointBarriers() const

    Returns whether point barriers are returned with the RouteResult.

    Reusing the list of PointBarriers from the RouteResult (as opposed to using the original list of PointBarriers) can increase the speed of any subsequent route calculations.

    bool RouteParameters::isReturnPolygonBarriers() const

    Returns whether polygon barriers are returned with the RouteResult.

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

    bool RouteParameters::isReturnPolylineBarriers() const

    Returns whether polyline barriers are returned with the RouteResult.

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

    bool RouteParameters::isReturnRoutes() const

    Returns whether routes are returned with the RouteResult.

    bool RouteParameters::isReturnStops() const

    Returns whether stops are returned with the RouteResult.

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

    Returns the output spatial reference.

    See also setOutputSpatialReference().

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

    Returns the output shape type for a route.

    See also setRouteShapeType().

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

    Returns the search WHERE clause from the specified sourceName.

    See also setSearchWhereClause().

    void RouteParameters::setAccumulateAttributeNames(const QStringList &accumulateAttributeNames)

    Sets a list of accumulateAttributeNames to be returned.

    See also accumulateAttributeNames().

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

    Sets the directionsDistanceUnits to directionsDistanceUnits.

    See also directionsDistanceUnits.

    void RouteParameters::setDirectionsLanguage(const QString &directionsLanguage)

    Sets the directionsLanguage of the resulting route directions.

    See also directionsLanguage.

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

    Sets the directionsStyle of the resulting route directions.

    See also directionsStyle.

    void RouteParameters::setFindBestSequence(bool findBestSequence)

    Sets the findBestSequence to findBestSequence.

    See also isFindBestSequence.

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

    Sets the outputSpatialReference.

    See also RouteParameters::outputSpatialReference.

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

    Sets point barriers.

    void RouteParameters::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.

    See also FeatureTable.

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

    Sets polygon barriers.

    void RouteParameters::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.

    See also FeatureTable.

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

    Sets polyline barriers.

    void RouteParameters::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.

    See also FeatureTable.

    void RouteParameters::setPreserveFirstStop(bool preserveFirstStop)

    Sets whether the analysis should preserveFirstStop.

    See also isPreserveFirstStop.

    void RouteParameters::setPreserveLastStop(bool preserveLastStop)

    Sets whether the analysis should preserveLastStop.

    See also isPreserveLastStop.

    void RouteParameters::setReturnDirections(bool returnDirections)

    Sets whether to returnDirections with the RouteResult.

    See also isReturnDirections.

    void RouteParameters::setReturnPointBarriers(bool returnPointBarriers)

    Sets whether to returnPointBarriers with the RouteResult.

    See also isReturnPointBarriers.

    void RouteParameters::setReturnPolygonBarriers(bool returnPolygonBarriers)

    Sets whether to returnPolygonBarriers with the RouteResult.

    See also isReturnPolygonBarriers.

    void RouteParameters::setReturnPolylineBarriers(bool returnPolylineBarriers)

    Sets whether to returnPolylineBarriers with the RouteResult.

    See also isReturnPolylineBarriers.

    void RouteParameters::setReturnRoutes(bool returnRoutes)

    Sets whether to returnRoutes with the RouteResult.

    See also isReturnRoutes.

    void RouteParameters::setReturnStops(bool returnStops)

    Sets whether to returnStops with the RouteResult.

    See also isReturnStops.

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

    Sets the output routeShapeType for a route.

    See also routeShapeType.

    void RouteParameters::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 stops 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 RouteParameters::setStartTime(const QDateTime &startTime)

    Sets the startTime of the route in UTC time.

    See also startTime().

    void RouteParameters::setStops(const QList<Esri::ArcGISRuntime::Stop> &stops)

    Sets stops.

    • stops - A QList of Stop instances. Contents of the QList are copied.

    A minimum of 2 stops are required to complete a RouteTask.

    void RouteParameters::setStopsWithFeatureTable(Esri::ArcGISRuntime::ArcGISFeatureTable *featureTable, const Esri::ArcGISRuntime::QueryParameters &queryParameters)

    Sets the stops 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 stops 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 features will not be queried until Solve is called.

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

    See also FeatureTable.

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

    Sets the travelMode.

    See also travelMode.

    QDateTime RouteParameters::startTime() const

    Returns the start time of the route in UTC time.

    See also setStartTime().

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

    Returns the travel mode.

    See also setTravelMode().

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

    Assignment operator from other RouteParameters.

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

    Move operator from other RouteParameters.

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