libandroid-navigation/src/main/java/com/mapbox/services/android/navigation/v5/utils/RouteUtils.java
@Nullable
  public static List<Point> calculateRemainingWaypoints(RouteProgress routeProgress) {
    if (routeProgress.directionsRoute().routeOptions() == null) {
      return null;
    }

    List<Point> coordinates = new ArrayList<>(routeProgress.directionsRoute().routeOptions().coordinates());

    if (coordinates.size() < routeProgress.remainingWaypoints()) {
      return null;
    }
    coordinates.subList(0, routeProgress.remainingWaypoints()).clear();
    return coordinates;
  }
/**
   * Given a {@link RouteProgress}, this method will calculate the remaining coordinates
   * along the given route based on total route coordinates and the progress remaining waypoints.
   * <p>
   * If the coordinate size is less than the remaining waypoints, this method
   * will return null.
   *
   * @param routeProgress for route coordinates and remaining waypoints
   * @return list of remaining waypoints as {@link Point}s
   * @since 0.10.0
   */
Given a  RouteProgress, this method will calculate the remaining coordinates
along the given route based on total route coordinates and the progress remaining waypoints.

If the coordinate size is less than the remaining waypoints, this method
will return null.

@param routeProgress for route coordinates and remaining waypoints
@return list of remaining waypoints as  Points
@since 0.10.0
Given a RouteProgress this method will calculate the remaining coordinates along the given route based on total route coordinates and the progress remaining waypoints . If the coordinate size is less than the remaining waypoints this method will return null . @param routeProgress for route coordinates and remaining waypoints @return list of remaining waypoints as Points @since 0 . 10 . 0
@Nullable
  public static List<Point> calculateRemainingWaypoints(RouteProgress routeProgress) {
    if (routeProgress.directionsRoute().routeOptions() == null) {
      return null;
    }
    List<Point> coordinates = new ArrayList<>(routeProgress.directionsRoute().routeOptions().coordinates());
    if (coordinates.size() < routeProgress.remainingWaypoints()) {
      return null;
    }
    coordinates.subList(0, routeProgress.remainingWaypoints()).clear();
    return coordinates;
  }
@ Nullable public static List < Point > calculateRemainingWaypoints ( RouteProgress routeProgress ) { if ( routeProgress . directionsRoute ( ) . routeOptions ( ) == null ) { return null ; } List < Point > coordinates = new ArrayList < > ( routeProgress . directionsRoute ( ) . routeOptions ( ) . coordinates ( ) ) ; if ( coordinates . size ( ) < routeProgress . remainingWaypoints ( ) ) { return null ; } coordinates . subList ( 0 , routeProgress . remainingWaypoints ( ) ) . clear ( ) ; return coordinates ; }
Given a {@link RouteProgress}, this method will calculate the remaining coordinates
 along the given route based on total route coordinates and the progress remaining waypoints.
Given a { @link RouteProgress } this method will calculate the remaining coordinates along the given route based on total route coordinates and the progress remaining waypoints .