Interface RoutingService

All Known Implementing Classes:
BaseRoutingService, BRouter, GoogleRoutingService, GraphHopper, StraightLine

public interface RoutingService
Interface for a service that determines the routing between two given positions.
Author:
Christian Pesch
  • Method Details

    • getName

      String getName()
    • isInitialized

      boolean isInitialized()
    • isDownload

      boolean isDownload()
    • getAvailableTravelModes

      List<TravelMode> getAvailableTravelModes()
    • getAvailableTravelRestrictions

      TravelRestrictions getAvailableTravelRestrictions()
    • getPreferredTravelMode

      TravelMode getPreferredTravelMode()
    • getPath

      String getPath()
    • setPath

      void setPath(String path)
    • getRouteBetween

      RoutingResult getRouteBetween(NavigationPosition from, NavigationPosition to, TravelMode travelMode, TravelRestrictions travelRestrictions)
    • getSnapToRoadPosition

      NavigationPosition getSnapToRoadPosition(NavigationPosition position)
    • downloadRoutingDataFor

      DownloadFuture downloadRoutingDataFor(String mapIdentifier, List<LongitudeAndLatitude> longitudeAndLatitudes)
    • calculateRemainingDownloadSize

      long calculateRemainingDownloadSize(List<MapDescriptor> mapDescriptors)
    • downloadRoutingData

      void downloadRoutingData(List<MapDescriptor> mapDescriptors)
    • getCoverageTiles

      Map<BoundingBox,Boolean> getCoverageTiles(BoundingBox area)
    • isRoutingDataAvailable

      default boolean isRoutingDataAvailable(MapDescriptor mapDescriptor)
      Whether routing data for the given map is present locally. Derived by default from the getCoverageTiles(BoundingBox) grid of the map's bounding box -- an empty grid counts as not available. Distinct from calculateRemainingDownloadSize() == 0, which is also true when nothing is published for the region and therefore nothing is missing.
    • getRoutingCoverage

      default Polygon getRoutingCoverage(MapDescriptor mapDescriptor, Runnable onAvailable)
      The exact area for which the routing data of the given map is valid, if known. Never blocks: returns null if the area is not (yet) known, in which case the caller falls back to the map's bounding box. If the area is fetched in the background, onAvailable is called once it arrives.
    • addRoutingServiceListener

      void addRoutingServiceListener(RoutingServiceListener routingServiceListener)