Fixing a rare case of route construction problems when origin were on the same edge which was stored reversed in graph.
This commit is contained in:
parent
8f06b2fa31
commit
2acfe2591f
@ -94,6 +94,9 @@ public:
|
|||||||
} else if(phantomNodes->startRatio < phantomNodes->targetRatio && _graph->GetEdgeData(currentEdge).backward) {
|
} else if(phantomNodes->startRatio < phantomNodes->targetRatio && _graph->GetEdgeData(currentEdge).backward) {
|
||||||
onSameEdge = true;
|
onSameEdge = true;
|
||||||
_upperbound = 10 * ApproximateDistance(phantomNodes->startCoord.lat, phantomNodes->startCoord.lon, phantomNodes->targetCoord.lat, phantomNodes->targetCoord.lon);
|
_upperbound = 10 * ApproximateDistance(phantomNodes->startCoord.lat, phantomNodes->startCoord.lon, phantomNodes->targetCoord.lat, phantomNodes->targetCoord.lon);
|
||||||
|
} else if(phantomNodes->startRatio > phantomNodes->targetRatio && _graph->GetEdgeData(currentEdge).forward && _graph->GetEdgeData(currentEdge).backward) {
|
||||||
|
onSameEdge = true;
|
||||||
|
_upperbound = 10 * ApproximateDistance(phantomNodes->startCoord.lat, phantomNodes->startCoord.lon, phantomNodes->targetCoord.lat, phantomNodes->targetCoord.lon);
|
||||||
} else if(phantomNodes->startRatio > phantomNodes->targetRatio) {
|
} else if(phantomNodes->startRatio > phantomNodes->targetRatio) {
|
||||||
onSameEdgeReversed = true;
|
onSameEdgeReversed = true;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user