Added flatbuffers output support to the 'Route' service.

This commit is contained in:
Denis Chaplygin
2019-08-07 11:50:59 +03:00
parent 9d7a74445d
commit affa8a4653
9 changed files with 796 additions and 500 deletions
-13
View File
@@ -20,7 +20,6 @@
#include <vector>
namespace TurnType = osrm::guidance::TurnType;
namespace DirectionModifier = osrm::guidance::DirectionModifier;
using TurnInstruction = osrm::guidance::TurnInstruction;
namespace osrm
@@ -34,18 +33,6 @@ namespace json
namespace detail
{
// Check whether to include a modifier in the result of the API
inline bool isValidModifier(const guidance::StepManeuver maneuver)
{
return (maneuver.waypoint_type == guidance::WaypointType::None ||
maneuver.instruction.direction_modifier != DirectionModifier::UTurn);
}
inline bool hasValidLanes(const guidance::IntermediateIntersection &intersection)
{
return intersection.lanes.lanes_in_turn > 0;
}
inline util::json::Array toJSON(const extractor::TurnLaneType::Mask lane_type)
{
util::json::Array result;