Class MultiValhallaOfflineRoutingService

java.lang.Object
com.massifmaps.routing.RoutingService
com.massifmaps.routing.MultiValhallaOfflineRoutingService

public class MultiValhallaOfflineRoutingService extends RoutingService
An offline routing service that uses Valhalla routing tiles.
  • Constructor Details

    • MultiValhallaOfflineRoutingService

      public MultiValhallaOfflineRoutingService()
      Constructs a new MultiValhallaOfflineRoutingService instance.
  • Method Details

    • getConfigurationParameter

      public Variant getConfigurationParameter(String param)
      Returns the value of specified Valhalla configuration parameter.
      Parameters:
      param - The name of the parameter. For example, "meili.auto.search_radius".
      Returns:
      The value of the parameter. If the parameter does not exist, empty variant is returned.
    • setConfigurationParameter

      public void setConfigurationParameter(String param, Variant value)
      Sets the value of specified Valhalla configuration parameter.
      Parameters:
      param - The name of the parameter. For example, "meili.auto.search_radius".
      value - The new value of the parameter.
    • getProfile

      public String getProfile()
      Description copied from class: RoutingService
      Returns the current routing profile.
      Overrides:
      getProfile in class RoutingService
      Returns:
      The current routing profile.
    • setProfile

      public void setProfile(String profile)
      Description copied from class: RoutingService
      Sets the current routing profile.
      Overrides:
      setProfile in class RoutingService
      Parameters:
      profile - The new routing profile. Routing profiles are dependent on specific routing service.
    • matchRoute

      public RouteMatchingResult matchRoute(RouteMatchingRequest request) throws IOException
      Description copied from class: RoutingService
      Matches specified points to the points on the road network.
      Overrides:
      matchRoute in class RoutingService
      Parameters:
      request - The matching request defining points.
      Returns:
      The matching result or null if route matching failed.
      Throws:
      IOException
    • calculateRoute

      public RoutingResult calculateRoute(RoutingRequest request) throws IOException
      Description copied from class: RoutingService
      Calculates routing result (path) based on routing request.
      Overrides:
      calculateRoute in class RoutingService
      Parameters:
      request - The routing request defining via points.
      Returns:
      The result or null if routing failed.
      Throws:
      IOException
    • add

      public void add(String database)
      Adds a new database.
      Parameters:
      database - The database file patht to be added.
    • remove

      public boolean remove(String database)
      Removes a database.
      Parameters:
      database - The database file patht to be removed.
      Returns:
      True if the database was removed. False otherwise ( database was not found).
    • addLocale

      public void addLocale(String key, String json)