Class ClosestFacilityParameters
- java.lang.Object
-
- com.esri.arcgisruntime.tasks.networkanalysis.ClosestFacilityParameters
-
public final class ClosestFacilityParameters extends java.lang.Object
Settings that are used when solvingClosestFacilityTask
. This class contains all inputs for the ClosestFacilityTask, as well as settings such as he impedance attribute, accumulate and restriction attributes, backtrack (u-turn) policy, etc.Use
ClosestFacilityTask.createDefaultParametersAsync()
to get an instance of this class that is initialized with smart default values based on the task's metadataClosestFacilityTask.getClosestFacilityTaskInfo()
.To set the facilities, incidents and barriers (point, polyline or polygon) for solving a closest facility, you can use the following methods
setFacilities(Iterable)
,setIncidents(Iterable)
,setPointBarriers(Iterable)
,setPolylineBarriers(Iterable)
orsetPolygonBarriers(Iterable)
. For example:
List<Facility> facilities = new ArrayList<Facility>(); facilities.add(new Facility(new Point(-13052490.008, 4035542.739, SpatialReferences.getWebMercator()))); mClosestFacilityParameters.setFacilities(facilities);
You can also set facilities, incidents and barriers by executing queries on a FeatureTable and extracting the facilities, incidents or barriers from features within the table, using
setFacilities(ArcGISFeatureTable, QueryParameters)
,setIncidents(ArcGISFeatureTable, QueryParameters)
,setPointBarriers(ArcGISFeatureTable, QueryParameters)
,setPolylineBarriers(ArcGISFeatureTable, QueryParameters)
, andsetPolygonBarriers(ArcGISFeatureTable, QueryParameters)
.- Since:
- 100.1.0
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearFacilities()
Clears any facilities that have been set usingsetFacilities(Iterable)
orsetFacilities(ArcGISFeatureTable, QueryParameters)
.void
clearIncidents()
Clears any incidents that have been set usingsetIncidents(Iterable)
orsetIncidents(ArcGISFeatureTable, QueryParameters)
.void
clearPointBarriers()
Clears any point barriers that have been set usingsetPointBarriers(Iterable)
orsetPointBarriers(ArcGISFeatureTable, QueryParameters)
.void
clearPolygonBarriers()
Clears any polygon barriers that have been set usingsetPolygonBarriers(Iterable)
orsetPolygonBarriers(ArcGISFeatureTable, QueryParameters)
.void
clearPolylineBarriers()
Clears any polyline barriers that have been set usingsetPolylineBarriers(Iterable)
orsetPolylineBarriers(ArcGISFeatureTable, QueryParameters)
.java.util.List<java.lang.String>
getAccumulateAttributeNames()
Gets a list of network attributes to be accumulated and returned as part of the closest facility route.double
getDefaultImpedanceCutoff()
Gets the default impedance cutoff which is a value for the impedance beyond which facilities should not be found.int
getDefaultTargetFacilityCount()
Gets the default target facility count.UnitSystem
getDirectionsDistanceUnits()
Gets the unit system of measurement used when providing distances for turn-by-turn directions.java.lang.String
getDirectionsLanguage()
Gets the language used when reporting directions.DirectionsStyle
getDirectionsStyle()
Gets the style being used for providing directions.SpatialReference
getOutputSpatialReference()
Gets the spatial reference in which the result geometries are returned.RouteShapeType
getRouteShapeType()
Gets the route shape type.java.lang.String
getSearchWhereClause(java.lang.String sourceName)
Gets the search where clause.java.util.Calendar
getStartTime()
Gets the start time that was set.StartTimeUsage
getStartTimeUsage()
Gets the start time usage type.TravelDirection
getTravelDirection()
Gets the travel direction.TravelMode
getTravelMode()
Gets the travel mode that was set.boolean
isReturnDirections()
Gets whether to return direction maneuvers in the result.boolean
isReturnPointBarriers()
Indicates if point barriers will be returned in the resultClosestFacilityResult.getPointBarriers()
.boolean
isReturnPolygonBarriers()
Indicates if polygon barriers will be returned in the resultClosestFacilityResult.getPolygonBarriers()
.boolean
isReturnPolylineBarriers()
Indicates if polyline barriers will be returned in the resultClosestFacilityResult.getPolylineBarriers()
.boolean
isReturnRoutes()
Gets whether to return routes in the resultClosestFacilityResult.getRoute(int, int)
.void
setDefaultImpedanceCutoff(double defaultImpedanceCutoff)
Sets the default impedance cutoff which is a value for the impedance beyond which facilities should not be found.void
setDefaultTargetFacilityCount(int defaultTargetFacilityCount)
Sets the default target facility count.void
setDirectionsDistanceUnits(UnitSystem directionsDistanceUnits)
Sets the unit system of measurement used when providing distances for turn-by-turn directions.void
setDirectionsLanguage(java.lang.String directionsLanguage)
Sets the language used when reporting directions.void
setDirectionsStyle(DirectionsStyle directionsStyle)
Sets the style to use for providing directions.void
setFacilities(ArcGISFeatureTable featureTable, QueryParameters queryParameters)
Sets the facilities that are searched for when finding the closest location, using features in a given feature table.void
setFacilities(java.lang.Iterable<Facility> facilities)
Sets the facilities that are searched for when finding the closest location.void
setIncidents(ArcGISFeatureTable featureTable, QueryParameters queryParameters)
Sets the incidents from which the service searches for the nearby locations, using features in a given feature table.void
setIncidents(java.lang.Iterable<Incident> incidents)
Sets the incidents from which the service searches for the nearby locations.void
setOutputSpatialReference(SpatialReference outputSpatialReference)
Sets the spatial reference in which the result geometries should be returned.void
setPointBarriers(ArcGISFeatureTable featureTable, QueryParameters queryParameters)
Sets the point barriers to avoid in the result closest facility route, using features in a given feature table.void
setPointBarriers(java.lang.Iterable<PointBarrier> barriers)
Sets the point barriers to avoid in the result closest facility route.void
setPolygonBarriers(ArcGISFeatureTable featureTable, QueryParameters queryParameters)
Sets the polygon barriers to avoid in the result closest facility route, using features in a given feature table.void
setPolygonBarriers(java.lang.Iterable<PolygonBarrier> barriers)
Sets the polygon barriers to avoid in the result closest facility route.void
setPolylineBarriers(ArcGISFeatureTable featureTable, QueryParameters queryParameters)
Sets the polyline barriers to avoid in the result closest facility route, using features in a given feature table.void
setPolylineBarriers(java.lang.Iterable<PolylineBarrier> barriers)
Sets the polyline barriers to avoid in the result closest facility route.void
setReturnDirections(boolean returnDirections)
Sets whether to return turn-by-turn directions in the resultClosestFacilityRoute.getDirectionManeuvers()
.void
setReturnPointBarriers(boolean returnPointBarriers)
Sets whether to return point barriers used while computing the route, in the resultClosestFacilityResult.getPointBarriers()
.void
setReturnPolygonBarriers(boolean returnPolygonBarriers)
Sets whether to return polygon barriers used while computing the route, in the resultClosestFacilityResult.getPolygonBarriers()
.void
setReturnPolylineBarriers(boolean returnPolylineBarriers)
Sets whether to return polyline barriers used while computing the route, in the resultClosestFacilityResult.getPolylineBarriers()
.void
setReturnRoutes(boolean returnRoutes)
Sets whether to return routes in the resultClosestFacilityResult.getRoute(int, int)
.void
setRouteShapeType(RouteShapeType routeShapeType)
Sets the route shape type.void
setSearchWhereClause(java.lang.String sourceName, java.lang.String searchWhereClause)
Sets the search where clause.void
setStartTime(java.util.Calendar startTime)
Sets the time the closest facility route begins.void
setStartTimeUsage(StartTimeUsage startTimeUsage)
Sets the start time usage type.void
setTravelDirection(TravelDirection travelDirection)
Sets the travel direction.void
setTravelMode(TravelMode travelMode)
Sets the travel mode.
-
-
-
Method Detail
-
getAccumulateAttributeNames
public java.util.List<java.lang.String> getAccumulateAttributeNames()
Gets a list of network attributes to be accumulated and returned as part of the closest facility route.For example, accumulateAttributeNames = {"Miles", "Kilometers"} indicates that the total cost of the closest facility route should also be calculated in miles and kilometers. All supported attributes can be obtained from
ClosestFacilityTaskInfo.getCostAttributes()
.- Returns:
- the accumulate attribute names
- Since:
- 100.1.0
- See Also:
ClosestFacilityTaskInfo.getAccumulateAttributeNames()
-
getTravelMode
public TravelMode getTravelMode()
Gets the travel mode that was set.- Returns:
- the travel mode or a default if not set
- Since:
- 100.1.0
-
setTravelMode
public void setTravelMode(TravelMode travelMode)
Sets the travel mode.- Parameters:
travelMode
- the travel mode- Throws:
java.lang.IllegalArgumentException
- if travelMode is null- Since:
- 100.1.0
-
getDefaultTargetFacilityCount
public int getDefaultTargetFacilityCount()
Gets the default target facility count.Current value will be applied for solving closest facility if
Incident.getTargetFacilityCount()
is not specified.- Returns:
- the default count of target facility
- Since:
- 100.1.0
- See Also:
ClosestFacilityTaskInfo.getDefaultTargetFacilityCount()
,Incident.setTargetFacilityCount(int)
-
setDefaultTargetFacilityCount
public void setDefaultTargetFacilityCount(int defaultTargetFacilityCount)
Sets the default target facility count.Current value will be applied for solving closest facility if
Incident.getTargetFacilityCount()
is not specified.- Parameters:
defaultTargetFacilityCount
- the default target facility count- Since:
- 100.1.0
- See Also:
ClosestFacilityTaskInfo.getDefaultTargetFacilityCount()
,Incident.setTargetFacilityCount(int)
-
getDefaultImpedanceCutoff
public double getDefaultImpedanceCutoff()
Gets the default impedance cutoff which is a value for the impedance beyond which facilities should not be found.For instance, while finding the closest hospitals from the site of an accident, a cutoff value of 15 minutes would mean that the closest facility task would search for the closest hospital within 15 minutes from the incident. If the closest hospital is 17 minutes away, no routes will be returned in the output routes. A cutoff value is especially useful when searching for multiple facilities or incidents. The units for impedance cutoff is based on the value of the
TravelMode.getImpedanceAttributeName()
. For example, ifTravelMode.getImpedanceAttributeName()
is TravelTime, the defaultImpedanceCutoff is specified in minutes. Current value will be applied for solving closest facility ifFacility.getImpedanceCutoff()
orIncident.getImpedanceCutoff()
is not specified.- Returns:
- the default impedance cutoff
- Since:
- 100.1.0
- See Also:
ClosestFacilityTaskInfo.getDefaultImpedanceCutoff()
,Facility.setImpedanceCutoff(double)
,Incident.setImpedanceCutoff(double)
-
setDefaultImpedanceCutoff
public void setDefaultImpedanceCutoff(double defaultImpedanceCutoff)
Sets the default impedance cutoff which is a value for the impedance beyond which facilities should not be found.For instance, while finding the closest hospitals from the site of an accident, a cutoff value of 15 minutes would mean that the closest facility task would search for the closest hospital within 15 minutes from the incident. If the closest hospital is 17 minutes away, no routes will be returned in the output routes. A cutoff value is especially useful when searching for multiple facilities or incidents. The units for impedance cutoff is based on the value of the
TravelMode.getImpedanceAttributeName()
. For example, ifTravelMode.getImpedanceAttributeName()
is TravelTime, the defaultImpedanceCutoff is specified in minutes. Current value will be applied for solving closest facility ifFacility.getImpedanceCutoff()
orIncident.getImpedanceCutoff()
are not specified.- Parameters:
defaultImpedanceCutoff
- the default impedance cutoff- Since:
- 100.1.0
- See Also:
ClosestFacilityTaskInfo.getDefaultImpedanceCutoff()
,Facility.setImpedanceCutoff(double)
,Incident.setImpedanceCutoff(double)
-
getStartTime
public java.util.Calendar getStartTime()
Gets the start time that was set. If not specified, defaults to the time the task is executed.- Returns:
- the start time. Returns null if it was not set
- Since:
- 100.1.0
- See Also:
ClosestFacilityTaskInfo.getStartTime()
-
setStartTime
public void setStartTime(java.util.Calendar startTime)
Sets the time the closest facility route begins. If not specified, defaults to the time the task is executed.- Parameters:
startTime
- start time, can be null- Since:
- 100.1.0
- See Also:
ClosestFacilityTaskInfo.getStartTime()
-
getStartTimeUsage
public StartTimeUsage getStartTimeUsage()
Gets the start time usage type.- Returns:
- the start time usage type
- Since:
- 100.1.0
- See Also:
ClosestFacilityTaskInfo.getStartTimeUsage()
-
setStartTimeUsage
public void setStartTimeUsage(StartTimeUsage startTimeUsage)
Sets the start time usage type.- Parameters:
startTimeUsage
- the StartTimeUsage enum value- Throws:
java.lang.IllegalArgumentException
- if startTimeUsage is null- Since:
- 100.1.0
- See Also:
ClosestFacilityTaskInfo.getStartTimeUsage()
-
getTravelDirection
public TravelDirection getTravelDirection()
Gets the travel direction.- Returns:
- the travel direction
- Since:
- 100.1.0
- See Also:
ClosestFacilityTaskInfo.getTravelDirection()
-
setTravelDirection
public void setTravelDirection(TravelDirection travelDirection)
Sets the travel direction.- Parameters:
travelDirection
- the travel direction- Throws:
java.lang.IllegalArgumentException
- if travelDirection is null- Since:
- 100.1.0
- See Also:
ClosestFacilityTaskInfo.getTravelDirection()
-
getRouteShapeType
public RouteShapeType getRouteShapeType()
Gets the route shape type.Specifies the route shape type that will be used in
ClosestFacilityRoute.getRouteGeometry()
.- Returns:
- the route shape type
- Since:
- 100.1.0
- See Also:
ClosestFacilityTaskInfo.getRouteShapeType()
-
setRouteShapeType
public void setRouteShapeType(RouteShapeType routeShapeType)
Sets the route shape type.Specifies the route shape type that will be used in
ClosestFacilityRoute.getRouteGeometry()
.- Parameters:
routeShapeType
- route shape type- Throws:
java.lang.IllegalArgumentException
- if routeShapeType is null- Since:
- 100.1.0
- See Also:
ClosestFacilityTaskInfo.getRouteShapeType()
-
getOutputSpatialReference
public SpatialReference getOutputSpatialReference()
Gets the spatial reference in which the result geometries are returned.- Returns:
- the output spatial reference
- Since:
- 100.1.0
- See Also:
ClosestFacilityTaskInfo.getOutputSpatialReference()
-
setOutputSpatialReference
public void setOutputSpatialReference(SpatialReference outputSpatialReference)
Sets the spatial reference in which the result geometries should be returned. If not specified then the results will be returned in the spatial reference specified byClosestFacilityTaskInfo.getOutputSpatialReference()
.- Parameters:
outputSpatialReference
- the output spatial reference- Throws:
java.lang.IllegalArgumentException
- if outputSpatialReference is null- Since:
- 100.1.0
- See Also:
ClosestFacilityTaskInfo.getOutputSpatialReference()
-
isReturnPointBarriers
public boolean isReturnPointBarriers()
Indicates if point barriers will be returned in the resultClosestFacilityResult.getPointBarriers()
.- Returns:
- true if returning point barriers in the result is enabled, false otherwise
- Since:
- 100.1.0
-
setReturnPointBarriers
public void setReturnPointBarriers(boolean returnPointBarriers)
Sets whether to return point barriers used while computing the route, in the resultClosestFacilityResult.getPointBarriers()
.- Parameters:
returnPointBarriers
- true to return point barriers, otherwise false- Since:
- 100.1.0
-
isReturnPolylineBarriers
public boolean isReturnPolylineBarriers()
Indicates if polyline barriers will be returned in the resultClosestFacilityResult.getPolylineBarriers()
.- Returns:
- true if returning polyline barriers in the result is enabled, false otherwise
- Since:
- 100.1.0
-
setReturnPolylineBarriers
public void setReturnPolylineBarriers(boolean returnPolylineBarriers)
Sets whether to return polyline barriers used while computing the route, in the resultClosestFacilityResult.getPolylineBarriers()
.- Parameters:
returnPolylineBarriers
- true to return polyline barriers, otherwise false- Since:
- 100.1.0
-
isReturnPolygonBarriers
public boolean isReturnPolygonBarriers()
Indicates if polygon barriers will be returned in the resultClosestFacilityResult.getPolygonBarriers()
.- Returns:
- true if returning polygon barriers in the result is enabled, false otherwise
- Since:
- 100.1.0
-
setReturnPolygonBarriers
public void setReturnPolygonBarriers(boolean returnPolygonBarriers)
Sets whether to return polygon barriers used while computing the route, in the resultClosestFacilityResult.getPolygonBarriers()
.- Parameters:
returnPolygonBarriers
- true to return polygon barriers, otherwise false- Since:
- 100.1.0
-
isReturnRoutes
public boolean isReturnRoutes()
Gets whether to return routes in the resultClosestFacilityResult.getRoute(int, int)
.- Returns:
- true if the routes will be returned in the result, false otherwise
- Since:
- 100.1.0
-
setReturnRoutes
public void setReturnRoutes(boolean returnRoutes)
Sets whether to return routes in the resultClosestFacilityResult.getRoute(int, int)
.- Parameters:
returnRoutes
- true to return routes, otherwise false- Since:
- 100.1.0
-
isReturnDirections
public boolean isReturnDirections()
Gets whether to return direction maneuvers in the result.- Returns:
- true if the direction maneuvers are returned in the result, false otherwise
- Since:
- 100.1.0
-
setReturnDirections
public void setReturnDirections(boolean returnDirections)
Sets whether to return turn-by-turn directions in the resultClosestFacilityRoute.getDirectionManeuvers()
.- Parameters:
returnDirections
- true to return direction maneuvers with the result routes, otherwise false- Since:
- 100.1.0
-
getDirectionsDistanceUnits
public UnitSystem getDirectionsDistanceUnits()
Gets the unit system of measurement used when providing distances for turn-by-turn directions.- Returns:
- the unit system of measurement
- Since:
- 100.1.0
- See Also:
UnitSystem
,ClosestFacilityTaskInfo.getDirectionsDistanceUnits()
-
setDirectionsDistanceUnits
public void setDirectionsDistanceUnits(UnitSystem directionsDistanceUnits)
Sets the unit system of measurement used when providing distances for turn-by-turn directions.- Parameters:
directionsDistanceUnits
- the unit system of measurement- Throws:
java.lang.IllegalArgumentException
- if directionsDistanceUnits is null- Since:
- 100.1.0
- See Also:
UnitSystem
,ClosestFacilityTaskInfo.getDirectionsDistanceUnits()
-
getDirectionsLanguage
public java.lang.String getDirectionsLanguage()
Gets the language used when reporting directions.- Returns:
- the directions language
- Since:
- 100.1.0
- See Also:
ClosestFacilityTaskInfo.getDirectionsLanguage()
-
setDirectionsLanguage
public void setDirectionsLanguage(java.lang.String directionsLanguage)
Sets the language used when reporting directions. The list of supported languages can be obtained by callingClosestFacilityTaskInfo.getSupportedLanguages()
.- Parameters:
directionsLanguage
- the directions language- Since:
- 100.1.0
- See Also:
ClosestFacilityTaskInfo.getDirectionsLanguage()
-
getDirectionsStyle
public DirectionsStyle getDirectionsStyle()
Gets the style being used for providing directions.- Returns:
- the directions style
- Since:
- 100.1.0
- See Also:
ClosestFacilityTaskInfo.getDirectionsStyle()
-
setDirectionsStyle
public void setDirectionsStyle(DirectionsStyle directionsStyle)
Sets the style to use for providing directions.- Parameters:
directionsStyle
- the directions style- Throws:
java.lang.IllegalArgumentException
- if directionsStyle is null- Since:
- 100.1.0
- See Also:
ClosestFacilityTaskInfo.getDirectionsStyle()
-
getSearchWhereClause
public java.lang.String getSearchWhereClause(java.lang.String sourceName)
Gets the search where clause.This filters the potential matches returned from the task based on an expression. Search where clauses are not supported for online closest facility tasks. They are only supported when solving local closest facility tasks.
- Parameters:
sourceName
- the name of source in local network- Returns:
- the search where clause. Returns empty string if sourceName was not set
- Since:
- 100.1.0
-
setSearchWhereClause
public void setSearchWhereClause(java.lang.String sourceName, java.lang.String searchWhereClause)
Sets the search where clause.This filters the potential matches returned from the task based on an expression. Search where clauses are not supported for online closest facility tasks. They are only supported when solving local closest facility tasks.
- Parameters:
sourceName
- the name of source in local networksearchWhereClause
- the search where clause- Since:
- 100.1.0
-
setFacilities
public void setFacilities(java.lang.Iterable<Facility> facilities)
Sets the facilities that are searched for when finding the closest location.Note: calling this method causes any facilities set by a previous call to
setFacilities(ArcGISFeatureTable, QueryParameters)
to be cleared.- Parameters:
facilities
- the facilities- Throws:
java.lang.IllegalArgumentException
- if facilities is null- Since:
- 100.1.0
-
setFacilities
public void setFacilities(ArcGISFeatureTable featureTable, QueryParameters queryParameters)
Sets the facilities that are searched for when finding the closest location, using features in a given feature table.The feature table can be either local or online and must be of geometry type point. Attributes from the feature table are mapped to the properties on the facilities objects generated from the 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
ClosestFacilityTask.solveClosestFacilityAsync(ClosestFacilityParameters)
is called.Note: calling this method causes any facilities set by a previous call to
setFacilities(Iterable)
to be cleared.- Parameters:
featureTable
- the feature tablequeryParameters
- the query parameters- Throws:
java.lang.IllegalArgumentException
- if featureTable or queryParameters is null- Since:
- 100.1.0
-
clearFacilities
public void clearFacilities()
Clears any facilities that have been set usingsetFacilities(Iterable)
orsetFacilities(ArcGISFeatureTable, QueryParameters)
.- Since:
- 100.1.0
-
setIncidents
public void setIncidents(java.lang.Iterable<Incident> incidents)
Sets the incidents from which the service searches for the nearby locations.Note: calling this method causes any incidents set by a previous call to
setIncidents(ArcGISFeatureTable, QueryParameters)
to be cleared.- Parameters:
incidents
- the incidents- Throws:
java.lang.IllegalArgumentException
- if facilities is null- Since:
- 100.1.0
-
setIncidents
public void setIncidents(ArcGISFeatureTable featureTable, QueryParameters queryParameters)
Sets the incidents from which the service searches for the nearby locations, using features in a given feature table.The feature table can be either local or online and must be of geometry type point. Attributes from the feature table are mapped to the properties on the incidents objects generated from the 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
ClosestFacilityTask.solveClosestFacilityAsync(ClosestFacilityParameters)
is called.Note: calling this method causes any incidents set by a previous call to
setIncidents(Iterable)
to be cleared.- Parameters:
featureTable
- the feature tablequeryParameters
- the query parameters- Throws:
java.lang.IllegalArgumentException
- if featureTable or queryParameters is null- Since:
- 100.1.0
-
clearIncidents
public void clearIncidents()
Clears any incidents that have been set usingsetIncidents(Iterable)
orsetIncidents(ArcGISFeatureTable, QueryParameters)
.- Since:
- 100.1.0
-
setPointBarriers
public void setPointBarriers(java.lang.Iterable<PointBarrier> barriers)
Sets the point barriers to avoid in the result closest facility route.Note: calling this method causes any point barriers set by a previous call to
setPointBarriers(ArcGISFeatureTable, QueryParameters)
to be cleared.- Parameters:
barriers
- the point barriers- Throws:
java.lang.IllegalArgumentException
- if barriers is null- Since:
- 100.1.0
-
setPointBarriers
public void setPointBarriers(ArcGISFeatureTable featureTable, QueryParameters queryParameters)
Sets the point barriers to avoid in the result closest facility route, using features in a given feature table.The feature table can be either local or online and 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
ClosestFacilityTask.solveClosestFacilityAsync(ClosestFacilityParameters)
is called.Note: calling this method causes any point barriers set by a previous call to
setPointBarriers(Iterable)
to be cleared.- Parameters:
featureTable
- the feature tablequeryParameters
- the query parameters- Throws:
java.lang.IllegalArgumentException
- if featureTable or queryParameters is null- Since:
- 100.1.0
-
clearPointBarriers
public void clearPointBarriers()
Clears any point barriers that have been set usingsetPointBarriers(Iterable)
orsetPointBarriers(ArcGISFeatureTable, QueryParameters)
.- Since:
- 100.1.0
-
setPolylineBarriers
public void setPolylineBarriers(java.lang.Iterable<PolylineBarrier> barriers)
Sets the polyline barriers to avoid in the result closest facility route.Note: calling this method causes any polyline barriers set by a previous call to
setPolylineBarriers(ArcGISFeatureTable, QueryParameters)
to be cleared.- Parameters:
barriers
- the polyline barriers- Throws:
java.lang.IllegalArgumentException
- if barriers is null- Since:
- 100.1.0
-
setPolylineBarriers
public void setPolylineBarriers(ArcGISFeatureTable featureTable, QueryParameters queryParameters)
Sets the polyline barriers to avoid in the result closest facility route, using features in a given feature table.The feature table can be either local or online and 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
ClosestFacilityTask.solveClosestFacilityAsync(ClosestFacilityParameters)
is called.Note: calling this method causes any polyline barriers set by a previous call to
setPolylineBarriers(Iterable)
to be cleared.- Parameters:
featureTable
- the feature tablequeryParameters
- the query parameters- Throws:
java.lang.IllegalArgumentException
- if featureTable or queryParameters is null- Since:
- 100.1.0
-
clearPolylineBarriers
public void clearPolylineBarriers()
Clears any polyline barriers that have been set usingsetPolylineBarriers(Iterable)
orsetPolylineBarriers(ArcGISFeatureTable, QueryParameters)
.- Since:
- 100.1.0
-
setPolygonBarriers
public void setPolygonBarriers(java.lang.Iterable<PolygonBarrier> barriers)
Sets the polygon barriers to avoid in the result closest facility route.Note: calling this method causes any polygon barriers set by a previous call to
setPolygonBarriers(ArcGISFeatureTable, QueryParameters)
to be cleared.- Parameters:
barriers
- the polygon barriers- Throws:
java.lang.IllegalArgumentException
- if barriers is null- Since:
- 100.1.0
-
setPolygonBarriers
public void setPolygonBarriers(ArcGISFeatureTable featureTable, QueryParameters queryParameters)
Sets the polygon barriers to avoid in the result closest facility route, using features in a given feature table.The feature table can be either local or online and 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
ClosestFacilityTask.solveClosestFacilityAsync(ClosestFacilityParameters)
is called.Note: calling this method causes any polygon barriers set by a previous call to
setPolygonBarriers(Iterable)
to be cleared.- Parameters:
featureTable
- the feature tablequeryParameters
- the query parameters- Throws:
java.lang.IllegalArgumentException
- if featureTable or queryParameters is null- Since:
- 100.1.0
-
clearPolygonBarriers
public void clearPolygonBarriers()
Clears any polygon barriers that have been set usingsetPolygonBarriers(Iterable)
orsetPolygonBarriers(ArcGISFeatureTable, QueryParameters)
.- Since:
- 100.1.0
-
-