This commit is contained in:
Emil Tin
2014-08-12 10:02:29 +02:00
parent 181dbe8493
commit a5ee7e78f6
6 changed files with 19 additions and 15 deletions
+4 -3
View File
@@ -228,7 +228,8 @@ template <class DataFacadeT> class BasicRoutingInterface
unsigned name_index = facade->GetNameIndexFromEdgeID(ed.id);
const TurnInstruction turn_instruction = facade->GetTurnInstructionForEdgeID(ed.id);
const TravelMode travel_mode = facade->GetTravelModeForEdgeID(ed.id);
if (!facade->EdgeIsCompressed(ed.id))
{
BOOST_ASSERT(!facade->EdgeIsCompressed(ed.id));
@@ -257,7 +258,7 @@ template <class DataFacadeT> class BasicRoutingInterface
BOOST_ASSERT(start_index <= end_index);
for (std::size_t i = start_index; i < end_index; ++i)
{
unpacked_path.emplace_back(id_vector[i], name_index, TurnInstruction::NoTurn, 0, 0);
unpacked_path.emplace_back(id_vector[i], name_index, TurnInstruction::NoTurn, 0, travel_mode);
}
unpacked_path.back().turn_instruction = turn_instruction;
unpacked_path.back().segment_duration = ed.distance;
@@ -304,7 +305,7 @@ template <class DataFacadeT> class BasicRoutingInterface
phantom_node_pair.target_phantom.name_id,
TurnInstruction::NoTurn,
0,
0});
phantom_node_pair.target_phantom.travel_mode});
}
}
-7
View File
@@ -309,13 +309,6 @@ template <class DataFacadeT> class ShortestPathRouting : public BasicRoutingInte
}
raw_route_data.unpacked_path_segments.resize(packed_legs1.size());
//TODO - needed?
// set mode of first instruction
// if the best route started from the opposite edge, use backward mode rather than forward
//if( packed_legs1.front() == phantom_nodes_vector[0].source_phantom.reverse_node_id ) {
// phantom_nodes_vector[0].source_phantom.travel_mode = phantom_nodes_vector[0].source_phantom.backward_travel_mode;
//}
for (const std::size_t index : osrm::irange<std::size_t>(0, packed_legs1.size()))
{
BOOST_ASSERT(!phantom_nodes_vector.empty());