Class ClosestFacilityParameters

    • 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
      • 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()
      • 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()
      • 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()
      • isReturnPointBarriers

        public boolean isReturnPointBarriers()
        Indicates if point barriers will be returned in the result ClosestFacilityResult.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 result ClosestFacilityResult.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 result ClosestFacilityResult.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 result ClosestFacilityResult.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 result ClosestFacilityResult.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 result ClosestFacilityResult.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 result ClosestFacilityResult.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 result ClosestFacilityResult.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 result ClosestFacilityRoute.getDirectionManeuvers().
        Parameters:
        returnDirections - true to return direction maneuvers with the result routes, otherwise false
        Since:
        100.1.0
      • 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()
      • 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 network
        searchWhereClause - 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 table
        queryParameters - the query parameters
        Throws:
        java.lang.IllegalArgumentException - if featureTable or queryParameters is null
        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 table
        queryParameters - the query parameters
        Throws:
        java.lang.IllegalArgumentException - if featureTable or queryParameters is null
        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 table
        queryParameters - the query parameters
        Throws:
        java.lang.IllegalArgumentException - if featureTable or queryParameters is null
        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 table
        queryParameters - the query parameters
        Throws:
        java.lang.IllegalArgumentException - if featureTable or queryParameters is null
        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 table
        queryParameters - the query parameters
        Throws:
        java.lang.IllegalArgumentException - if featureTable or queryParameters is null
        Since:
        100.1.0