java.lang.Object
com.esri.arcgisruntime.tasks.networkanalysis.Route

public final class Route extends Object
Represents an independent route within a RouteResult.
Since:
100.0.0
  • Method Details

    • getRouteGeometry

      public Polyline getRouteGeometry()
      Gets the route geometry.
      Returns:
      the route geometry
      Since:
      100.0.0
    • getRouteName

      public String getRouteName()
      Gets the route name. Same as Stop.getRouteName() of the stops included in this route.
      Returns:
      the route name
      Since:
      100.0.0
    • getStops

      public List<Stop> getStops()
      Gets the stops visited along this route. Only available if RouteParameters.setReturnStops(boolean) is set. The sequence stops are visited in the route may be different from the order they are present in the list if RouteParameters.setFindBestSequence(boolean) is set.
      Returns:
      an unmodifiable list of the stops
      Since:
      100.0.0
    • getCost

      public double getCost(String attributeName)
      Gets the cost for the given attribute.
      Parameters:
      attributeName - attribute name
      Returns:
      the cost
      Throws:
      IllegalArgumentException - if attributeName is null
      ArcGISRuntimeException - if attributeName is invalid
      Since:
      100.0.0
    • getTravelTime

      public double getTravelTime()
      Gets the time (in minutes) to travel along the route.
      Returns:
      the travel time
      Since:
      100.0.0
    • getTotalTime

      public double getTotalTime()
      Gets the overall time (in minutes) taken by the route from start to end. This includes getTravelTime() and getWaitTime().
      Returns:
      the total time
      Since:
      100.0.0
    • getWaitTime

      public double getWaitTime()
      Gets the time (in minutes) spent at stops waiting for time windows to open. Only applicable if time windows were specified for stops. Stop.setTimeWindowStart(Calendar) and Stop.setTimeWindowEnd(Calendar) can be used for specifying the time windows
      Returns:
      the wait time
      Since:
      100.0.0
    • getViolationTime

      public double getViolationTime()
      Gets the total number of minutes that exceed the permissible time windows for stops on this route, based on calculated arrival time at all the stops. Only applicable if time windows were specified for stops.

      Stop.setTimeWindowStart(Calendar) and Stop.setTimeWindowEnd(Calendar) can be used for specifying the time windows

      Returns:
      the violation time
      Since:
      100.0.0
    • getStartTime

      public Calendar getStartTime()
      Gets the time when the route begins (departing from the first stop).
      Returns:
      the local start time. Returns null if the local start time was not set in RouteParameters.setStartTime(Calendar)
      Since:
      100.0.0
    • getStartTimeShift

      public double getStartTimeShift()
      Time zone shift for start time, in minutes.
      Returns:
      time zone shift for start time, in minutes
      Since:
      100.0.0
    • getEndTime

      public Calendar getEndTime()
      Gets the time when the route ends (arriving at the last stop).
      Returns:
      the local end time. Returns null if the local start time was not set in set in RouteParameters
      Since:
      100.0.0
    • getEndTimeShift

      public double getEndTimeShift()
      Time zone shift for end time, in minutes.
      Returns:
      time zone shift for end time, in minutes
      Since:
      100.0.0
    • getTotalLength

      public double getTotalLength()
      Gets the total length of the Route in meters.
      Returns:
      the total route length in meters
      Since:
      100.0.0
    • getDirectionManeuvers

      public List<DirectionManeuver> getDirectionManeuvers()
      Gets the turn-by-turn driving directions along this route. Only available if RouteParameters.setReturnDirections(boolean) is set.
      Returns:
      an unmodifiable list of the direction maneuvers
      Since:
      100.0.0