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
Annotation of the whole route leg with fine-grained information about each segment or node id.
AnnotationMetaData
Some meta-data attached to route annotations
BearingRequest
Limits the search to segments with given bearing in degrees towards true north in clockwise direction.
Client
This is the client you will use to connect to the HTTP service of your ORSM backend.
Hint
Hint from previous request to derive position in street network (base64 encoded)
Intersection
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.
Lane
A Lane represents a turn lane at the corresponding turn location.
Location
The location of a point anywhere on earth. The order of the fields is longitude, latitude
MatchRequest
MatchRequestBuilder
Builder for MatchRequest.
MatchResponse
MatchingRoute
MatchingWaypoint
NearestRequest
NearestRequestBuilder
Builder for NearestRequest.
NearestResponse
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)
Response
Route
Represents a route through (potentially multiple) waypoints.
RouteLeg
Represents a route between two waypoints.
RouteRequest
RouteRequestBuilder
Builder for RouteRequest.
RouteResponse
RouteStep
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.
StepManeuver
A maneuver that must be performed to follow a route
TableRequest
TableRequestBuilder
Builder for TableRequest.
TableResponse
TileRequest
TileRequestBuilder
Builder for TileRequest.
TripRequest
TripRequestBuilder
Builder for TripRequest.
TripResponse
TripWaypoint
Waypoint
Object used to describe waypoint on a route

Enums§

AlternativesRequest
Approach
Keep waypoints on curb side
Coordinates
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.
Destination
Returned route ends at any or first coordinate (by default, any)
DirectionChange
An indication of a change of direction
DrivingSide
The legal driving side at a location
Error
This enumeration lists the problem that may arise when interacting with OSRM
FallbackCoordinateRequest
When using a fallback_speed , use the user-supplied coordinate ( input ), or the snapped location ( snapped ) for calculating distances.
GapHandling
Allows the input track splitting based on huge timestamp gaps between points.
GeoJsonGeometry
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.
GeoJsonPoint
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]
Geometries
Route geometry format (influences overview and per step)
Geometry
Represents a geometry which can either be encoded with polyline of polyline6 or explicit in the form of a geojson
ManeuverType
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
MatchRequestBuilderError
Error type for MatchRequestBuilder
NearestRequestBuilderError
Error type for NearestRequestBuilder
OsrmStatus
Every response object has a code property containing one of the strings below or a service dependent code:
OverviewRequest
Radius
Limits the search to given radius in meters.
RouteAnnotationRequest
RouteRequestBuilderError
Error type for RouteRequestBuilder
Service
Which is the service being used
Snapping
Default snapping avoids is_startpoint (see profile) edges, any will snap to any edge in the graph
Source
Returned route starts at any or first coordinate (by default, any)
TableAnnotationRequest
TableRequestBuilderError
Error type for TableRequestBuilder
TileRequestBuilderError
Error type for TileRequestBuilder
TransportationMode
Mode of transportation
TripRequestBuilderError
Error type for TripRequestBuilder

Traits§

Request
WithOptions