handle steep off-ramps
This commit is contained in:
committed by
Patrick Niklaus
parent
27a94f3ca6
commit
3c8781855e
@@ -1,5 +1,6 @@
|
||||
#include "extractor/guidance/constants.hpp"
|
||||
#include "extractor/guidance/turn_analysis.hpp"
|
||||
#include "extractor/guidance/classification_data.hpp"
|
||||
|
||||
#include "util/coordinate.hpp"
|
||||
#include "util/coordinate_calculation.hpp"
|
||||
@@ -84,6 +85,15 @@ std::vector<TurnOperation> TurnAnalysis::getTurns(const NodeID from_nid, const E
|
||||
// Handle sliproads
|
||||
intersection = handleSliproads(via_eid, std::move(intersection));
|
||||
|
||||
// Turn On Ramps Into Off Ramps, if we come from a motorway-like road
|
||||
if (isMotorwayClass(node_based_graph.GetEdgeData(via_eid).road_classification.road_class))
|
||||
{
|
||||
std::for_each(intersection.begin(), intersection.end(), [](ConnectedRoad &road) {
|
||||
if (road.turn.instruction.type == TurnType::OnRamp)
|
||||
road.turn.instruction.type = TurnType::OffRamp;
|
||||
});
|
||||
}
|
||||
|
||||
std::vector<TurnOperation> turns;
|
||||
for (auto road : intersection)
|
||||
if (road.entry_allowed)
|
||||
|
||||
Reference in New Issue
Block a user