Package com.massifmaps.routing
Class ValhallaOfflineRoutingService
java.lang.Object
com.massifmaps.routing.RoutingService
com.massifmaps.routing.ValhallaOfflineRoutingService
An offline routing service that uses Valhalla routing tiles.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new ValhallaOfflineRoutingService instance given database file. -
Method Summary
Modifier and TypeMethodDescriptionvoidcalculateRoute(RoutingRequest request) Calculates routing result (path) based on routing request.getConfigurationParameter(String param) Returns the value of specified Valhalla configuration parameter.Returns the current routing profile.matchRoute(RouteMatchingRequest request) Matches specified points to the points on the road network.voidsetConfigurationParameter(String param, Variant value) Sets the value of specified Valhalla configuration parameter.voidsetProfile(String profile) Sets the current routing profile.
-
Constructor Details
-
ValhallaOfflineRoutingService
Constructs a new ValhallaOfflineRoutingService instance given database file.- Parameters:
path- The full path to the database file.- Throws:
Exception- If the database file could not be opened or read.IOException
-
-
Method Details
-
getConfigurationParameter
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
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
Description copied from class:RoutingServiceReturns the current routing profile.- Overrides:
getProfilein classRoutingService- Returns:
- The current routing profile.
-
setProfile
Description copied from class:RoutingServiceSets the current routing profile.- Overrides:
setProfilein classRoutingService- Parameters:
profile- The new routing profile. Routing profiles are dependent on specific routing service.
-
matchRoute
Description copied from class:RoutingServiceMatches specified points to the points on the road network.- Overrides:
matchRoutein classRoutingService- Parameters:
request- The matching request defining points.- Returns:
- The matching result or null if route matching failed.
- Throws:
IOException
-
calculateRoute
Description copied from class:RoutingServiceCalculates routing result (path) based on routing request.- Overrides:
calculateRoutein classRoutingService- Parameters:
request- The routing request defining via points.- Returns:
- The result or null if routing failed.
- Throws:
IOException
-
addLocale
-