refactor of turn analysis into turn handlers
This commit is contained in:
committed by
Patrick Niklaus
parent
dfd180a292
commit
fcbf527ba5
@@ -0,0 +1,31 @@
|
||||
#include "extractor/guidance/intersection.hpp"
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
namespace extractor
|
||||
{
|
||||
namespace guidance
|
||||
{
|
||||
|
||||
ConnectedRoad::ConnectedRoad(const TurnOperation turn, const bool entry_allowed)
|
||||
: entry_allowed(entry_allowed), turn(turn)
|
||||
{
|
||||
}
|
||||
|
||||
std::string toString(const ConnectedRoad &road)
|
||||
{
|
||||
std::string result = "[connection] ";
|
||||
result += std::to_string(road.turn.eid);
|
||||
result += " allows entry: ";
|
||||
result += std::to_string(road.entry_allowed);
|
||||
result += " angle: ";
|
||||
result += std::to_string(road.turn.angle);
|
||||
result += " instruction: ";
|
||||
result += std::to_string(static_cast<std::int32_t>(road.turn.instruction.type)) + " " +
|
||||
std::to_string(static_cast<std::int32_t>(road.turn.instruction.direction_modifier));
|
||||
return result;
|
||||
}
|
||||
|
||||
} // namespace guidance
|
||||
} // namespace extractor
|
||||
} // namespace osrm
|
||||
Reference in New Issue
Block a user