public interface

RouteParameters

com.esri.core.tasks.na.RouteParameters

Class Overview

Interface for specifying parameters for a solve operations. An instance of this interface can be obtained through the retrieveDefaultRouteTaskParameters() method.

Summary

Public Methods
abstract void dispose()
Cleanup any resources that the settings object might be holding.
abstract String[] getAccumulateAttributeNames()
Return the accumulate attribute names e.g.
abstract AttributeParameterValue[] getAttributeParameterValues()
Return the attribute parameter values e.g.
abstract String getDirectionsLanguage()
Returns the language of the output directions e.g.
abstract DirectionsLengthUnit getDirectionsLengthUnit()
Returns the unit of measurement for the length of directions results.
abstract DirectionsOutputType getDirectionsOutputType()
Returns the verbosity of the directions output i.e.
abstract String getDirectionsStyleName()
Returns the directions style name e.g.
abstract boolean getFindBestSequence()
Returns the current setting for reordering stops (Traveling Salesman Problem).
abstract boolean getIgnoreInvalidLocations()
Returns whether or not invalid stops should be ignored.
abstract String getImpedanceAttributeName()
Return the impedance attribute name.
abstract SpatialReference getOutSpatialReference()
Return the output spatial reference.
abstract Double getOutputGeometryPrecision()
Returns the precision of the output geometry.
abstract Unit.EsriUnit getOutputGeometryPrecisionUnits()
Returns the enumeration value of the unit of measurement on the output geometry precision (Miles, Meters, etc.).
abstract NAOutputLine getOutputLines()
Returns the enumeration value for the output shape type e.g.
abstract NAFeatures getPointBarriers()
Returns the point barriers.
abstract NAFeatures getPolygonBarriers()
Returns the polygon barriers.
abstract NAFeatures getPolylineBarriers()
Returns the polyline barriers.
abstract boolean getPreserveFirstStop()
Returns the current setting for preserving the first stop when reordering stops for optimality (TSP).
abstract boolean getPreserveLastStop()
Returns the current setting for preserving the last stop when reordering stops for optimality (TSP).
abstract UTurnRestriction getRestrictUTurns()
Returns the enumeration value for the u-turn policy e.g.
abstract String[] getRestrictionAttributeNames()
Returns the names of set restriction attributes e.g.
abstract Date getStartTime()
Returns the start date/time of the route.
abstract NAFeatures getStops()
Returns the stops to route between.
abstract Boolean getUseHierarchy()
Returns the solver hierarchy setting.
abstract boolean getUseTimeWindows()
Returns whether or not time windows should be used.
abstract int hashCode()
abstract boolean isReturnDirections()
Returns whether or not directions should be returned in the event of a successful solve.
abstract boolean isReturnPointBarriers()
Gets the setting for returning point barriers on the results object.
abstract boolean isReturnPolygonBarriers()
Gets the setting for returning polygon barriers on the results object.
abstract boolean isReturnPolylineBarriers()
Get the setting for returning polyline barriers on the results object.
abstract boolean isReturnRoutes()
Returns whether or not routes (an individual route has a geometry and a collection of attributes) should be returned in the event of a successful solve.
abstract boolean isReturnStops()
Returns whether or not input stops should be returned on the result object.
abstract boolean isReturnZ()
Get the setting for returning z values.
abstract void setAccumulateAttributeNames(String[] accumulateAttributeNames)
Set the accumulate attributes e.g.
abstract void setAttributeParameterValues(AttributeParameterValue[] attributeParameterValues)
Set the attribute parameter values e.g.
abstract void setDirectionsLanguage(String directionsLanguage)
Set the directions language e.g.
abstract void setDirectionsLengthUnit(DirectionsLengthUnit directionsLengthUnit)
Set the unit of measurement for the length of directions e.g.
abstract void setDirectionsOutputType(DirectionsOutputType directionsType)
Set the directions output type e.g.
abstract void setDirectionsStyleName(String directionsStyleName)
Set the directions style name e.g.
abstract void setFindBestSequence(Boolean findBestSequence)
Set whether or not to reorder the stops for optimality (Traveling Salesman Problem).
abstract void setIgnoreInvalidLocations(Boolean ignoreInvalidLocations)
Set whether or not to ignore invalid locations while routing.
abstract void setImpedanceAttributeName(String impedanceAttributeName)
Set the impedance attribute.
abstract void setOutSpatialReference(SpatialReference outSpatialReference)
Set the output spatial reference.
abstract void setOutputGeometryPrecision(Double outputGeometryPrecision)
Set the precision of the output geometry.
abstract void setOutputGeometryPrecisionUnits(Unit.EsriUnit outputGeometryPrecisionUnits)
Set the enumeration value of the unit of measurement on the output geometry precision (Miles, Meters, etc.).
abstract void setOutputLines(NAOutputLine outputLines)
Sets the enumeration value for the output shape type e.g.
abstract void setPointBarriers(NAFeatures pointBarriers)
Sets the point barriers.
abstract void setPolygonBarriers(NAFeatures polygonBarriers)
Sets the polygon barriers.
abstract void setPolylineBarriers(NAFeatures polylineBarriers)
Set the polyline barriers.
abstract void setPreserveFirstStop(Boolean preserveFirstStop)
Set whether or not to preserve the first stop when reordering stops for optimality (TSP).
abstract void setPreserveLastStop(Boolean preserveLastStop)
Set whether or not to preserve the last stop when reordering stops for optimality (TSP).
abstract void setRestrictUTurns(UTurnRestriction restrictUTurns)
Set the u-turn restriction policy e.g.
abstract void setRestrictionAttributeNames(String[] restrictionAttributeNames)
Set the names of the restriction attributes e.g.
abstract void setReturnDirections(boolean returnDirections)
Set whether or not to return driving directions in the event of a successful solve.
abstract void setReturnPointBarriers(boolean returnBarriers)
Set whether or not to return point barriers on the result object.
abstract void setReturnPolygonBarriers(boolean returnPolygonBarriers)
Set whether or not to return polygon barriers on the results object.
abstract void setReturnPolylineBarriers(boolean returnPolylineBarriers)
Set whether or not to return polyline barriers on the results object.
abstract void setReturnRoutes(boolean returnRoutes)
Set whether or not to return routes (a single route has a geometry and a collection of attributes) in the event of a successful solve.
abstract void setReturnStops(boolean returnStops)
Set whether or not to return stops on the results object.
abstract void setReturnZ(boolean returnZ)
Set whether or not to return z values.
abstract void setStartTime(Date startTime)
Set the desired start date/time of the solve.
abstract void setStops(NAFeatures stops)
Set the stops to be routed between.
abstract void setUseHierarchy(Boolean useHierarchy)
Set whether or not to solve using a hierarchy.
abstract void setUseTimeWindows(Boolean useTimeWindows)
Set whether or not to use time windows on the solve.

Public Methods

public abstract void dispose ()

Cleanup any resources that the settings object might be holding. Note, this is only applicable for offline routing and calling dispose() will invalidate the settings object.

public abstract String[] getAccumulateAttributeNames ()

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

Returns
String[] A collection of accumulate attribute names.

public abstract AttributeParameterValue[] getAttributeParameterValues ()

Return the attribute parameter values e.g. Vehicle Weight, Vehicle Height, Preferential settings for tollroads, etc.

Returns
AttributeParameterValue[] A collection of attribute parameter values.

public abstract String getDirectionsLanguage ()

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

Returns
String The directions language.

public abstract DirectionsLengthUnit getDirectionsLengthUnit ()

Returns the unit of measurement for the length of directions results.

Returns
DirectionsLengthUnit Directions length unit of measurement.

public abstract DirectionsOutputType getDirectionsOutputType ()

Returns the verbosity of the directions output i.e. Complete, Standard, Instructions Only, etc.
Note, this feature is currently unsupported when using local data. A RouteTask using local data will always return "Complete" directions information.

Returns
DirectionsOutputType The directions output type.

public abstract String getDirectionsStyleName ()

Returns the directions style name e.g. NACampus, NANavigation, etc.

Returns
String The directions style name.

public abstract boolean getFindBestSequence ()

Returns the current setting for reordering stops (Traveling Salesman Problem).

Returns
boolean true if stops should be optimally reordered.

public abstract boolean getIgnoreInvalidLocations ()

Returns whether or not invalid stops should be ignored.

Returns
boolean true if an invalid stop should be ignored.

public abstract String getImpedanceAttributeName ()

Return the impedance attribute name. This is the attribute that the route is optimized for, e.g. "TravelTime" or "Distance".

Returns
String The name the of the impedance attribute.

public abstract SpatialReference getOutSpatialReference ()

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

Returns
SpatialReference The output spatial reference.

public abstract Double getOutputGeometryPrecision ()

Returns the precision of the output geometry. Precision is useful for reducing the response size while sacrificing route shape quality.

Returns
Double The output precision.

public abstract Unit.EsriUnit getOutputGeometryPrecisionUnits ()

Returns the enumeration value of the unit of measurement on the output geometry precision (Miles, Meters, etc.).

Returns
Unit.EsriUnit The enumeration value of the the unit of measurement.

public abstract NAOutputLine getOutputLines ()

Returns the enumeration value for the output shape type e.g. straight line shape, true shape, or no shape.

Returns
NAOutputLine The enumeration value for the output shape type.

public abstract NAFeatures getPointBarriers ()

Returns the point barriers.

Returns
NAFeatures The collection of point barriers.

public abstract NAFeatures getPolygonBarriers ()

Returns the polygon barriers.

Returns
NAFeatures A collection of polygon barriers.

public abstract NAFeatures getPolylineBarriers ()

Returns the polyline barriers.

Returns
NAFeatures A collection of polyline barriers.

public abstract boolean getPreserveFirstStop ()

Returns the current setting for preserving the first stop when reordering stops for optimality (TSP). Note, this settings only applies when FindBestSequence = true.

Returns
boolean true if the first stop should be preserved when reordering stops for optimality.

public abstract boolean getPreserveLastStop ()

Returns the current setting for preserving the last stop when reordering stops for optimality (TSP). Note, this settings only applies when FindBestSequence = true.

Returns
boolean true if the first stop should be preserved when reordering stops for optimality.

public abstract UTurnRestriction getRestrictUTurns ()

Returns the enumeration value for the u-turn policy e.g. no u-turns, u-turns at stops, etc.

Returns
UTurnRestriction An enumeration value representing the u-turn policy.

public abstract String[] getRestrictionAttributeNames ()

Returns the names of set restriction attributes e.g. "Oneway".

Returns
String[] A collection of restriction attribute names.

public abstract Date getStartTime ()

Returns the start date/time of the route.

Returns
Date null if the a start time was not set, otherwise the start date/time.

public abstract NAFeatures getStops ()

Returns the stops to route between.

Returns
NAFeatures NAFeatures object containing the stops, whose graphics can be directly accessed using getFeatures()

public abstract Boolean getUseHierarchy ()

Returns the solver hierarchy setting. A hierarchical solve tends to prefer higher-order streets such a freeways.

Returns
Boolean True if hierarchy is enabled.

public abstract boolean getUseTimeWindows ()

Returns whether or not time windows should be used. Time windows allow for specification of arrival and departure times on individual stops.

Returns
boolean true if time windows should be used.

public abstract int hashCode ()

Returns
int

public abstract boolean isReturnDirections ()

Returns whether or not directions should be returned in the event of a successful solve.

Returns
boolean true if directions should be returned on the result object.

public abstract boolean isReturnPointBarriers ()

Gets the setting for returning point barriers on the results object.

Returns
boolean True if point barriers should be returned on the results object.

public abstract boolean isReturnPolygonBarriers ()

Gets the setting for returning polygon barriers on the results object.

Returns
boolean True if polygon barriers should be returned on the results object.

public abstract boolean isReturnPolylineBarriers ()

Get the setting for returning polyline barriers on the results object.

Returns
boolean True if polyline barriers should be returned on the results object.

public abstract boolean isReturnRoutes ()

Returns whether or not routes (an individual route has a geometry and a collection of attributes) should be returned in the event of a successful solve.

Returns
boolean true if routes should be returned (enabled by default).

public abstract boolean isReturnStops ()

Returns whether or not input stops should be returned on the result object.

Returns
boolean true if stops should be returned (disabled by default).

public abstract boolean isReturnZ ()

Get the setting for returning z values.

Returns
boolean True if z values should be returned.

public abstract void setAccumulateAttributeNames (String[] accumulateAttributeNames)

Set the accumulate attributes e.g. "Miles", "Minutes", etc. Accumulate attributes can be used for collecting information other than the default impedance attribute.

Parameters
accumulateAttributeNames String: The names of the accumulate attributes to be set.

public abstract void setAttributeParameterValues (AttributeParameterValue[] attributeParameterValues)

Set the attribute parameter values e.g. Vehicle Weight, Vehicle Height, etc. Attribute parameter values are useful for customizing individual restrictions ("Don't travel on a roads weight limits below 6 tons").

Parameters
attributeParameterValues AttributeParameterValue: The attribute parameter values to set.

public abstract void setDirectionsLanguage (String directionsLanguage)

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

Parameters
directionsLanguage String: The ISO language code of the directions language to be set. If an unsupported language is set, an exception will occur at solve time.

public abstract void setDirectionsLengthUnit (DirectionsLengthUnit directionsLengthUnit)

Set the unit of measurement for the length of directions e.g. miles, kilometers, etc.

Parameters
directionsLengthUnit DirectionsLengthUnit: The enumeration value representing the desired length unit.

public abstract void setDirectionsOutputType (DirectionsOutputType directionsType)

Set the directions output type e.g. Complete, Standard, Instructions Only, etc.
Note, this feature is currently unsupported when using local data. A RouteTask using local data will always return "Complete" directions information.

Parameters
directionsType DirectionsOutputType: The enumeration value for the type of returned directions.

public abstract void setDirectionsStyleName (String directionsStyleName)

Set the directions style name e.g. NACampus, NANavigation, etc.

Parameters
directionsStyleName String: The name of the desired directions style.

public abstract void setFindBestSequence (Boolean findBestSequence)

Set whether or not to reorder the stops for optimality (Traveling Salesman Problem). Note, the first and last stop can be preserved using setPreserveFirstStop(Boolean) and setPreserveLastStop(Boolean) accordingly.

Parameters
findBestSequence Boolean: If true, reorder the stops to find the optimal order, respecting the preservations strategies of first and last stops.

public abstract void setIgnoreInvalidLocations (Boolean ignoreInvalidLocations)

Set whether or not to ignore invalid locations while routing.

Parameters
ignoreInvalidLocations Boolean: If true, invalid locations will be ignored while routing.

public abstract void setImpedanceAttributeName (String impedanceAttributeName)

Set the impedance attribute. This is the attribute that the route will be optimized for e.g. "TravelTime" or "Distance".

Parameters
impedanceAttributeName String: The name of the desired impedance attribute.

public abstract void setOutSpatialReference (SpatialReference outSpatialReference)

Set the output spatial reference. All route geometries will be returned in this spatial reference.

Parameters
outSpatialReference SpatialReference: The output spatial reference.

public abstract void setOutputGeometryPrecision (Double outputGeometryPrecision)

Set the precision of the output geometry. Precision is useful for reducing the response size while sacrificing route shape quality.

Parameters
outputGeometryPrecision Double: The output geometry precision.

public abstract void setOutputGeometryPrecisionUnits (Unit.EsriUnit outputGeometryPrecisionUnits)

Set the enumeration value of the unit of measurement on the output geometry precision (Miles, Meters, etc.).

Parameters
outputGeometryPrecisionUnits Unit.EsriUnit: The enumeration value for the unit of measurement on the output geometry precision.

public abstract void setOutputLines (NAOutputLine outputLines)

Sets the enumeration value for the output shape type e.g. straight line shape, true shape, or no shape.
Note, when using local data, TRUE_SHAPE and TRUE_SHAPE_WITH_MEASURE are equivalent. Measures will be returned for either enumeration value.

Parameters
outputLines NAOutputLine: The enumeration value for the output shape type.

public abstract void setPointBarriers (NAFeatures pointBarriers)

Sets the point barriers.

Parameters
pointBarriers NAFeatures: Collection of point barriers.

public abstract void setPolygonBarriers (NAFeatures polygonBarriers)

Sets the polygon barriers.

Parameters
polygonBarriers NAFeatures: Collection of polygon barriers.

public abstract void setPolylineBarriers (NAFeatures polylineBarriers)

Set the polyline barriers.

Parameters
polylineBarriers NAFeatures: Collection of polyline barriers.

public abstract void setPreserveFirstStop (Boolean preserveFirstStop)

Set whether or not to preserve the first stop when reordering stops for optimality (TSP). This settings is only valid if setFindBestSequence(Boolean) is true.

Parameters
preserveFirstStop Boolean: If true, the first stop will be fixed when finding the optimal order of stops.

public abstract void setPreserveLastStop (Boolean preserveLastStop)

Set whether or not to preserve the last stop when reordering stops for optimality (TSP). This settings is only valid if setFindBestSequence(Boolean) is true.

Parameters
preserveLastStop Boolean

public abstract void setRestrictUTurns (UTurnRestriction restrictUTurns)

Set the u-turn restriction policy e.g. no u-turns, u-turns at stops, etc.

Parameters
restrictUTurns UTurnRestriction: An enumeration value for the uturn policy.

public abstract void setRestrictionAttributeNames (String[] restrictionAttributeNames)

Set the names of the restriction attributes e.g. "Oneway". Restriction attribtues are useful for controlling which feature to route on.

Parameters
restrictionAttributeNames String: A collection of restriction attribute names.

public abstract void setReturnDirections (boolean returnDirections)

Set whether or not to return driving directions in the event of a successful solve.

Parameters
returnDirections boolean: If true, driving directions will be returned on the result object.

public abstract void setReturnPointBarriers (boolean returnBarriers)

Set whether or not to return point barriers on the result object.

Parameters
returnBarriers boolean: If true, return point barriers on the results object.

public abstract void setReturnPolygonBarriers (boolean returnPolygonBarriers)

Set whether or not to return polygon barriers on the results object.

Parameters
returnPolygonBarriers boolean: If true, return polygon barriers on the results object.

public abstract void setReturnPolylineBarriers (boolean returnPolylineBarriers)

Set whether or not to return polyline barriers on the results object.

Parameters
returnPolylineBarriers boolean: If true, return polygon barriers on the results object.

public abstract void setReturnRoutes (boolean returnRoutes)

Set whether or not to return routes (a single route has a geometry and a collection of attributes) in the event of a successful solve.

Parameters
returnRoutes boolean: If true, return routes on the result object.

public abstract void setReturnStops (boolean returnStops)

Set whether or not to return stops on the results object.

Parameters
returnStops boolean: If true, stops will be accessible on the results object.

public abstract void setReturnZ (boolean returnZ)

Set whether or not to return z values.

Parameters
returnZ boolean: If true, return z values.

public abstract void setStartTime (Date startTime)

Set the desired start date/time of the solve. This is useful in conjunction with time windows and historical traffic data.

Parameters
startTime Date: The desired start date/time.

public abstract void setStops (NAFeatures stops)

Set the stops to be routed between. This is the most critical parameter for a routing solve and any given solve will fail if two valid stops are not provided.

Parameters
stops NAFeatures: The stops to be routed between.

public abstract void setUseHierarchy (Boolean useHierarchy)

Set whether or not to solve using a hierarchy. A hierarchical solve tends to prefer higher-order streets such a freeways.

Parameters
useHierarchy Boolean: If true, solve using a hierarchy (defaults to true).

public abstract void setUseTimeWindows (Boolean useTimeWindows)

Set whether or not to use time windows on the solve. Time windows can be used to specify arrival/departure times for a given stop.

Parameters
useTimeWindows Boolean: If true, apply time windows to the solve.