Package com.massifmaps.routing
Class OSRMOfflineRoutingService
java.lang.Object
com.massifmaps.routing.RoutingService
com.massifmaps.routing.OSRMOfflineRoutingService
An offline routing service that uses Massif-specific routing
database file created from OSRM prepared routing files.
Note: this class is experimental and may change or even be removed in future SDK versions.
database file created from OSRM prepared routing files.
Note: this class is experimental and may change or even be removed in future SDK versions.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new OSRMOfflineRoutingService instance given database file. -
Method Summary
Modifier and TypeMethodDescriptioncalculateRoute(RoutingRequest request) Calculates routing result (path) based on routing request.Returns the current routing profile.matchRoute(RouteMatchingRequest request) Matches specified points to the points on the road network.voidsetProfile(String profile) Sets the current routing profile.
-
Constructor Details
-
OSRMOfflineRoutingService
Constructs a new OSRMOfflineRoutingService 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
-
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
-