A set of classes and methods for accessing services from Open Source Routing Machine HTTP API.
Map matching matches/snaps given GPS points to the road network in the most plausible way. Please note the request might result multiple sub-traces. Large jumps in the timestamps (> 60s) or improbable transitions lead to trace splits if a complete matching could not be found. The algorithm might not be able to match all points. Outliers are removed if they can not be matched successfully. Not all request options have been implemented. See http://project-osrm.org/docs/v5.7.0/api/#match-service.
Snaps the supplied coordinates to the road network, and returns the most likely route given the points.
@param coordinates The string containing comma separated lon/lat. Multiple coordinate pairs are separated by a semicolon.
@return A JSON object containing the response code, an array of waypoint objects, and an array of route objects.
Snaps the supplied coordinates to the road network, and returns the most likely route given the points.
@param coordinates The string containing comma separated lon/lat. Multiple coordinate pairs are separated by a semicolon.
@param profile The mode of travel. Valid values are 'car', 'bike' and 'foot'.
@return A JSON object containing the response code, an array of waypoint objects, and an array of route objects.
Snaps a coordinate to the street network and returns the nearest n matches. Where coordinates only supports a single {longitude},{latitude} entry. See http://project-osrm.org/docs/v5.7.0/api/#nearest-service.
Finds the nearest route to the given location.
@param coordinates The string containing a single comma separated lon/lat pair. Only one coordinate pair is permitted.
@return A JSON object containing the response code, and an array of waypoint objects.
Finds the nearest route to the given location, limiting the number of results to a specified number.
@param coordinates The string containing a single comma separated lon/lat pair. Only one coordinate pair is permitted.
@param maxReturns The maximum number of matches to return.
@return A JSON object containing the response code, and an array of waypoint objects.
Finds the nearest route to the given location, accounting for mode of travel.
@param coordinates The string containing a single comma separated lon/lat pair. Only one coordinate pair is permitted.
@param profile The mode of travel. Valid values are 'car', 'bike' and 'foot'.
@return A JSON object containing the response code, and an array of waypoint objects.
Finds the nearest route to the given location, accounting for mode of travel and limiting the number of results to a specified number.
@param coordinates The string containing a single comma separated lon/lat pair. Only one coordinate pair is permitted.
@param profile The mode of travel. Valid values are 'car', 'bike' and 'foot'.
@return A JSON object containing the response code, and an array of waypoint objects.
Handles point to point routing. Not all request options have been implemented. See http://project-osrm.org/docs/v5.7.0/api/#route-service.
Finds the fastest route between coordinates in the supplied order.
@param coordinates The string containing comma separated lon/lat. Multiple coordinate pairs are separated by a semicolon.
@return A JSON object containing the response code, an array of waypoint objects, and an array of route objects
Finds the fastest route between coordinates in the supplied order, accounting for mode of travel.
@param coordinates The string containing comma separated lon/lat. Multiple coordinate pairs are separated by a semicolon.
@param profile The string specifying mode of travel. Valid values are 'car', 'bike' and 'foot'.
@return A JSON object containing the response code, an array of waypoint objects, and an array of route objects.
Calculates the travel time matrix of the fastest route between all supplied coordinates. No geographic data is returned with this service. Not all request options have been implemented. See http://project-osrm.org/docs/v5.7.0/api/#table-service.
Finds the fastest route between coordinates in the supplied order.
@param coordinates The string containing comma separated lon/lat. Multiple coordinate pairs are separated by a semicolon.
@return A JSON object containing the response code, a 2d array of durations, and arrays of waypoint objects representing sources, and an destinations.
Finds the fastest route between coordinates in the supplied order accounting for mode of travel.
@param coordinates The string containing comma separated lon/lat. Multiple coordinate pairs are separated by a semicolon.
@param profile The mode of travel. Valid values are 'car', 'bike' and 'foot'.
@return A JSON object containing the response code, a 2d array of durations, and arrays of waypoint objects representing sources, and an destinations.
The trip service solves the Traveling Salesman Problem using a greedy heuristic (farthest-insertion algorithm) for 10 or more waypoints and uses brute force for less than 10 waypoints. The returned path does not have to be the fastest path. As TSP is NP-hard it only returns an approximation. Note that all input coordinates have to be connected for the trip service to work. Not all request options have been implemented. See http://project-osrm.org/docs/v5.7.0/api/#trip-service.
Solves the Traveling Salesman Problem using the road network and input points.
@param coordinates The string containing comma separated lon/lat. Multiple coordinate pairs are separated by a semicolon.
@return A JSON object containing the response code, an array of waypoint objects, and an array of route objects.
Solves the Traveling Salesman Problem using the road network and input points.
@param coordinates The string containing comma separated lon/lat. Multiple coordinate pairs are separated by a semicolon.
@param profile The mode of travel. Valid values are 'car', 'bike' and 'foot'.
@return A JSON object containing the response code, an array of waypoint objects, and an array of route objects.
The tile generates Mapbox Vector Tiles that can be viewed with a vector-tile capable slippy-map viewer. The tiles contain road geometries and metadata that can be used to examine the routing graph. The tiles are generated directly from the data in-memory, so are in sync with actual routing results, and let you examine which roads are actually routable, and what weights they have applied. See http://project-osrm.org/docs/v5.7.0/api/#tile-service.