Package com.massifmaps.routing
Class RoutingService
java.lang.Object
com.massifmaps.routing.RoutingService
- Direct Known Subclasses:
MultiValhallaOfflineRoutingService,OSRMOfflineRoutingService,PackageManagerRoutingService,PackageManagerValhallaRoutingService,SGREOfflineRoutingService,ValhallaOfflineRoutingService,ValhallaOnlineRoutingService
An abstract base class for routing services (either online or offline).
-
Constructor Summary
Constructors -
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
-
RoutingService
protected RoutingService()The default constructor.
-
-
Method Details
-
getProfile
Returns the current routing profile.- Returns:
- The current routing profile.
-
setProfile
Sets the current routing profile.- Parameters:
profile- The new routing profile. Routing profiles are dependent on specific routing service.
-
matchRoute
Matches specified points to the points on the road network.- Parameters:
request- The matching request defining points.- Returns:
- The matching result or null if route matching failed.
- Throws:
Exception- If IO error occured during the route matching.IOException
-
calculateRoute
Calculates routing result (path) based on routing request.- Parameters:
request- The routing request defining via points.- Returns:
- The result or null if routing failed.
- Throws:
Exception- If IO error occured during the route calculation.IOException
-