Added flatbuffers schema.
This commit is contained in:
parent
3f34c8d88c
commit
f6f86b2a52
21
include/engine/api/flatbuffers/fbresult.fbs
Normal file
21
include/engine/api/flatbuffers/fbresult.fbs
Normal file
@ -0,0 +1,21 @@
|
||||
include "match.fbs";
|
||||
include "nearest.fbs";
|
||||
include "route.fbs";
|
||||
include "table.fbs";
|
||||
include "trip.fbs";
|
||||
|
||||
namespace osrm.engine.api.fbresult;
|
||||
|
||||
union ServiceResponse {
|
||||
match: Match,
|
||||
nearest: Nearest,
|
||||
route: Route,
|
||||
table: Table,
|
||||
trip: Trip
|
||||
}
|
||||
|
||||
table FBResult {
|
||||
code: string;
|
||||
message: string;
|
||||
response: ServiceResponse;
|
||||
}
|
3445
include/engine/api/flatbuffers/fbresult_generated.h
Normal file
3445
include/engine/api/flatbuffers/fbresult_generated.h
Normal file
File diff suppressed because it is too large
Load Diff
7
include/engine/api/flatbuffers/match.fbs
Normal file
7
include/engine/api/flatbuffers/match.fbs
Normal file
@ -0,0 +1,7 @@
|
||||
include "route.fbs";
|
||||
namespace osrm.engine.api.fbresult;
|
||||
|
||||
table Match {
|
||||
tracepoints: [Waypoint];
|
||||
matchings: [Route];
|
||||
}
|
6
include/engine/api/flatbuffers/nearest.fbs
Normal file
6
include/engine/api/flatbuffers/nearest.fbs
Normal file
@ -0,0 +1,6 @@
|
||||
include "waypoint.fbs";
|
||||
namespace osrm.engine.api.fbresult;
|
||||
|
||||
table Nearest {
|
||||
waypoints: [Waypoint];
|
||||
}
|
6
include/engine/api/flatbuffers/position.fbs
Normal file
6
include/engine/api/flatbuffers/position.fbs
Normal file
@ -0,0 +1,6 @@
|
||||
namespace osrm.engine.api.fbresult;
|
||||
|
||||
table Position {
|
||||
longitute: double;
|
||||
latitude: double;
|
||||
}
|
122
include/engine/api/flatbuffers/route.fbs
Normal file
122
include/engine/api/flatbuffers/route.fbs
Normal file
@ -0,0 +1,122 @@
|
||||
include "waypoint.fbs";
|
||||
namespace osrm.engine.api.fbresult;
|
||||
|
||||
table Metadata {
|
||||
datasource_names: [string];
|
||||
}
|
||||
|
||||
table Annotation {
|
||||
distance: [uint];
|
||||
duration: [uint];
|
||||
datasources: [uint];
|
||||
nodes: [uint];
|
||||
weight: [uint];
|
||||
speed: [double];
|
||||
metadata: Metadata;
|
||||
}
|
||||
|
||||
enum ManeuverType: byte {
|
||||
Turn,
|
||||
NewName,
|
||||
Depart,
|
||||
Arrive,
|
||||
Merge,
|
||||
OnRamp,
|
||||
OffRamp,
|
||||
Fork,
|
||||
EndOfRoad,
|
||||
Continue,
|
||||
Roundabout,
|
||||
Rotary,
|
||||
RoundaboutTurn,
|
||||
Notification,
|
||||
ExitRoundabout,
|
||||
ExitRotary
|
||||
}
|
||||
|
||||
enum Turn: byte {
|
||||
None,
|
||||
UTurn,
|
||||
SharpRight,
|
||||
Right,
|
||||
SlightRight,
|
||||
Straight,
|
||||
SlightLeft,
|
||||
Left,
|
||||
SharpLeft
|
||||
}
|
||||
|
||||
table StepManeuver {
|
||||
location: Position;
|
||||
bearing_before: ushort;
|
||||
bearing_after: ushort;
|
||||
type: ManeuverType;
|
||||
modifier: Turn;
|
||||
exit: ubyte;
|
||||
}
|
||||
|
||||
table Lane {
|
||||
indications: [Turn];
|
||||
valid: bool;
|
||||
}
|
||||
|
||||
table Intersection {
|
||||
location: Position;
|
||||
bearings: [ushort];
|
||||
classes: [string];
|
||||
entry: [bool];
|
||||
in: uint;
|
||||
out: uint;
|
||||
lanes: [Lane];
|
||||
}
|
||||
|
||||
table Polyline {
|
||||
polyline: [Position];
|
||||
}
|
||||
|
||||
union Geometry {
|
||||
polyline: string,
|
||||
polyline6: string,
|
||||
coordinates: Polyline
|
||||
}
|
||||
|
||||
table Step {
|
||||
distance: double;
|
||||
duration: double;
|
||||
geometry: Geometry;
|
||||
name: string;
|
||||
ref: uint;
|
||||
pronunciation: string;
|
||||
destinations: [string];
|
||||
exits: [string];
|
||||
mode: string;
|
||||
maneuver: StepManeuver;
|
||||
intersections: [Intersection];
|
||||
rotary_name: string;
|
||||
rotary_pronunciation: string;
|
||||
driving_side: bool; //Where true stands for the right side.
|
||||
}
|
||||
|
||||
table Leg {
|
||||
distance: double;
|
||||
duration: double;
|
||||
weight: double;
|
||||
summary: string;
|
||||
annotations: Annotation;
|
||||
steps: [Step];
|
||||
}
|
||||
|
||||
table RouteObject {
|
||||
distance: double;
|
||||
duration: double;
|
||||
weight: double;
|
||||
weight_name: string;
|
||||
confidence: double; //Used only by 'Match' service
|
||||
geometry: Geometry;
|
||||
legs: [Leg];
|
||||
}
|
||||
|
||||
table Route{
|
||||
routes: [RouteObject];
|
||||
waypoints: [Waypoint];
|
||||
}
|
15
include/engine/api/flatbuffers/table.fbs
Normal file
15
include/engine/api/flatbuffers/table.fbs
Normal file
@ -0,0 +1,15 @@
|
||||
include "waypoint.fbs";
|
||||
namespace osrm.engine.api.fbresult;
|
||||
|
||||
table VectorUint {
|
||||
column: [uint];
|
||||
}
|
||||
|
||||
table Table {
|
||||
waypoints: [Waypoint];
|
||||
durations: [VectorUint];
|
||||
distances: [VectorUint];
|
||||
sources: [Waypoint];
|
||||
destinations: [Waypoint];
|
||||
fallback_speed_cells: [VectorUint];
|
||||
}
|
7
include/engine/api/flatbuffers/trip.fbs
Normal file
7
include/engine/api/flatbuffers/trip.fbs
Normal file
@ -0,0 +1,7 @@
|
||||
include "route.fbs";
|
||||
namespace osrm.engine.api.fbresult;
|
||||
|
||||
table Trip {
|
||||
waypoints: [Waypoint];
|
||||
trips: [Route];
|
||||
}
|
14
include/engine/api/flatbuffers/waypoint.fbs
Normal file
14
include/engine/api/flatbuffers/waypoint.fbs
Normal file
@ -0,0 +1,14 @@
|
||||
include "position.fbs";
|
||||
namespace osrm.engine.api.fbresult;
|
||||
|
||||
table Waypoint {
|
||||
longitute: double;
|
||||
latitude: double;
|
||||
name: string;
|
||||
location: Position;
|
||||
nodes: [double]; //Used only by 'Nearest' service
|
||||
matchings_index: uint; //Used only by 'Match' service
|
||||
waypoint_index: uint; //Used by 'Match' and 'Trip' services
|
||||
alternatives_count: uint; //Used only by 'Match' service
|
||||
trips_index: uint; //Used only by 'Trip' service
|
||||
}
|
Loading…
Reference in New Issue
Block a user