Optimizing FB schema:
* Replaced Response union with nullable fields * "Ok" code replaced with a boolean and a separate structure for a error code and message. * Inlined geometry, thus removing one layer of indirection.
This commit is contained in:
@@ -6,17 +6,18 @@ include "trip.fbs";
|
||||
|
||||
namespace osrm.engine.api.fbresult;
|
||||
|
||||
union ServiceResponse {
|
||||
match: Match,
|
||||
nearest: Nearest,
|
||||
route: Route,
|
||||
table: Table,
|
||||
trip: Trip
|
||||
table Error {
|
||||
code: string;
|
||||
message: string;
|
||||
}
|
||||
|
||||
table FBResult {
|
||||
code: string;
|
||||
message: string;
|
||||
error: bool = false;
|
||||
code: Error;
|
||||
data_version: string;
|
||||
response: ServiceResponse;
|
||||
match: Match;
|
||||
nearest: Nearest;
|
||||
route: Route;
|
||||
table: Table;
|
||||
trip: Trip;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -70,16 +70,11 @@ table Intersection {
|
||||
lanes: [Lane];
|
||||
}
|
||||
|
||||
table Geometry {
|
||||
polyline: string;
|
||||
polyline6: string;
|
||||
coordinates: [Position];
|
||||
}
|
||||
|
||||
table Step {
|
||||
distance: double;
|
||||
duration: double;
|
||||
geometry: Geometry;
|
||||
polyline: string;
|
||||
coordinates: [Position];
|
||||
weight: double;
|
||||
name: string;
|
||||
ref: string;
|
||||
@@ -109,7 +104,8 @@ table RouteObject {
|
||||
weight: double;
|
||||
weight_name: string;
|
||||
confidence: double; //Used only by 'Match' service
|
||||
geometry: Geometry;
|
||||
polyline: string;
|
||||
coordinates: [Position];
|
||||
legs: [Leg];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user