Unpacking of intermediate paths

This commit is contained in:
Dennis Luxen
2014-02-11 11:42:24 +01:00
parent 3be644265b
commit c71c8b0047
20 changed files with 639 additions and 443 deletions
+5 -5
View File
@@ -64,7 +64,7 @@ void DescriptionFactory::SetStartSegment(const PhantomNode & start) {
start_phantom = start;
AppendSegment(
start.location,
PathData(0, start.nodeBasedEdgeNameID, 10, start.weight1)
PathData(0, start.name_id, 10, start.forward_weight)
);
}
@@ -73,9 +73,9 @@ void DescriptionFactory::SetEndSegment(const PhantomNode & target) {
pathDescription.push_back(
SegmentInformation(
target.location,
target.nodeBasedEdgeNameID,
target.name_id,
0,
target.weight1,
target.reverse_weight,
0,
true
)
@@ -137,7 +137,7 @@ void DescriptionFactory::BuildRouteSummary(
const double distance,
const unsigned time
) {
summary.startName = start_phantom.nodeBasedEdgeNameID;
summary.destName = target_phantom.nodeBasedEdgeNameID;
summary.startName = start_phantom.name_id;
summary.destName = target_phantom.name_id;
summary.BuildDurationAndLengthStrings(distance, time);
}
+2 -2
View File
@@ -180,7 +180,7 @@ public:
pathDescription.pop_back();
pathDescription.back().necessary = true;
pathDescription.back().turn_instruction = TurnInstructions.NoTurn;
target_phantom.nodeBasedEdgeNameID = (pathDescription.end()-2)->name_id;
target_phantom.name_id = (pathDescription.end()-2)->name_id;
}
} else {
pathDescription[indexOfSegmentBegin].duration *= (1.-target_phantom.ratio);
@@ -190,7 +190,7 @@ public:
pathDescription.erase(pathDescription.begin());
pathDescription[0].turn_instruction = TurnInstructions.HeadOn;
pathDescription[0].necessary = true;
start_phantom.nodeBasedEdgeNameID = pathDescription[0].name_id;
start_phantom.name_id = pathDescription[0].name_id;
}
} else {
pathDescription[0].duration *= start_phantom.ratio;