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:
Denis Chaplygin
2019-08-08 11:46:25 +03:00
parent affa8a4653
commit 13287d9970
7 changed files with 335 additions and 605 deletions
+10 -9
View File
@@ -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
+4 -8
View File
@@ -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];
}