Crate osrm_client

source ·
Expand description

OSRM-Client

The point of OSRM client is to provide a lightweight binding to the HTTP services provided by the OSRM backend. The documentation of the original OSRM API is available here.

Structs

Annotation of the whole route leg with fine-grained information about each segment or node id.
Some meta-data attached to route annotations
Limits the search to segments with given bearing in degrees towards true north in clockwise direction.
This is the client you will use to connect to the HTTP service of your ORSM backend.
Hint from previous request to derive position in street network (base64 encoded)
An intersection gives a full representation of any cross-way the path passes bay. For every step, the very first intersection (intersections[0]) corresponds to the location of the StepManeuver. Further intersections are listed for every cross-way until the next turn instruction.
A Lane represents a turn lane at the corresponding turn location.
The location of a point anywhere on earth. The order of the fields is longitude, latitude
As waypoints is a single thing, returned by that service, using it with option skip_waypoints set to true is quite useless, but still possible. In that case only code field will be returned (which would mean an empty response)
Represents a route through (potentially multiple) waypoints.
Represents a route between two waypoints.
A step consists of a maneuver such as a turn or merge, followed by a distance of travel along a single way to the subsequent step.
A maneuver that must be performed to follow a route
Object used to describe waypoint on a route

Enums

Keep waypoints on curb side
Most services are quite flexible wrt the coordinates they accept: it can either be a single coord, a sequence of coord separated by semicolon, or a polyline (follows Google polyline format) or polyline with precision of 6.
Returned route ends at any or first coordinate (by default, any)
An indication of a change of direction
The legal driving side at a location
This enumeration lists the problem that may arise when interacting with OSRM
When using a fallback_speed , use the user-supplied coordinate ( input ), or the snapped location ( snapped ) for calculating distances.
Allows the input track splitting based on huge timestamp gaps between points.
GeoJSON[1] is an open standard format designed for representing simple geographical features, along with their non-spatial attributes. It is based on the JSON format.
Points are [x, y] or [x, y, z]. They may be [longitude, latitude] or [eastings, northings]. Elevation is an optional third number. They are decimal numbers. [6] For example, London (51.5074° North, 0.1278° West) is [-0.1278, 51.5074]
Route geometry format (influences overview and per step)
Represents a geometry which can either be encoded with polyline of polyline6 or explicit in the form of a geojson
type A string indicating the type of maneuver. new identifiers might be introduced without API change Types unknown to the client should be handled like the turn type, the existence of correct modifier values is guranteed
Error type for MatchRequestBuilder
Error type for NearestRequestBuilder
Every response object has a code property containing one of the strings below or a service dependent code:
Limits the search to given radius in meters.
Error type for RouteRequestBuilder
Which is the service being used
Default snapping avoids is_startpoint (see profile) edges, any will snap to any edge in the graph
Returned route starts at any or first coordinate (by default, any)
Error type for TableRequestBuilder
Error type for TileRequestBuilder
Mode of transportation
Error type for TripRequestBuilder

Traits