Add local left_hand_driving flag in API version 2

This commit is contained in:
Michael Krasnyk
2017-08-15 16:53:27 +02:00
parent af3f0a4782
commit de942155bf
11 changed files with 96 additions and 39 deletions
+7 -7
View File
@@ -205,16 +205,16 @@ void GraphCompressor::Compress(
boost::optional<EdgeWeight> node_weight_penalty = boost::none;
if (has_node_penalty)
{
// generate an artifical turn for the turn penalty generation
ExtractionTurn extraction_turn(true);
extraction_turn.source_restricted = fwd_edge_data1.restricted;
extraction_turn.target_restricted = fwd_edge_data2.restricted;
// we cannot handle this as node penalty, if it depends on turn direction
if (extraction_turn.source_restricted != extraction_turn.target_restricted)
if (fwd_edge_data1.restricted != fwd_edge_data2.restricted)
continue;
// generate an artifical turn for the turn penalty generation
ExtractionTurn extraction_turn(true,
fwd_edge_data1.restricted,
fwd_edge_data2.restricted,
fwd_edge_data1.is_left_hand_driving);
scripting_environment.ProcessTurn(extraction_turn);
node_duration_penalty = extraction_turn.duration * 10;
node_weight_penalty = extraction_turn.weight * weight_multiplier;