Package com.massifmaps.routing
Class MultiValhallaOfflineRoutingService
java.lang.Object
com.massifmaps.routing.RoutingService
com.massifmaps.routing.MultiValhallaOfflineRoutingService
An offline routing service that uses Valhalla routing tiles.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new MultiValhallaOfflineRoutingService instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a new database.voidcalculateRoute(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.booleanRemoves a database.voidsetConfigurationParameter(String param, Variant value) Sets the value of specified Valhalla configuration parameter.voidsetProfile(String profile) Sets the current routing profile.
-
Constructor Details
-
MultiValhallaOfflineRoutingService
public MultiValhallaOfflineRoutingService()Constructs a new MultiValhallaOfflineRoutingService instance.
-
-
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
-
add
Adds a new database.- Parameters:
database- The database file patht to be added.
-
remove
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
-