fixes ticket 43
This commit is contained in:
parent
4f5678fc95
commit
045922fb56
@ -58,8 +58,8 @@ EdgeBasedGraphFactory::EdgeBasedGraphFactory(int nodes, std::vector<NodeBasedEdg
|
||||
edge.data.backward = i->isBackward();
|
||||
edge.data.edgeBasedNodeID = edges.size();
|
||||
edges.push_back( edge );
|
||||
std::swap( edge.source, edge.target );
|
||||
if( edge.data.backward ) {
|
||||
std::swap( edge.source, edge.target );
|
||||
edge.data.forward = i->isBackward();
|
||||
edge.data.backward = i->isForward();
|
||||
edge.data.edgeBasedNodeID = edges.size();
|
||||
@ -126,7 +126,17 @@ void EdgeBasedGraphFactory::Run() {
|
||||
++secondRestrictionIterator;
|
||||
} while(u == secondRestrictionIterator->fromNode);
|
||||
}
|
||||
|
||||
if(_nodeBasedGraph->EndEdges(v) == _nodeBasedGraph->BeginEdges(v) + 1 && _nodeBasedGraph->GetEdgeData(e1).type != 14 ) {
|
||||
EdgeBasedNode currentNode;
|
||||
currentNode.nameID = _nodeBasedGraph->GetEdgeData(e1).nameID;
|
||||
currentNode.lat1 = inputNodeInfoList[u].lat;
|
||||
currentNode.lon1 = inputNodeInfoList[u].lon;
|
||||
currentNode.lat2 = inputNodeInfoList[v].lat;
|
||||
currentNode.lon2 = inputNodeInfoList[v].lon;
|
||||
currentNode.id = _nodeBasedGraph->GetEdgeData(e1).edgeBasedNodeID;;
|
||||
currentNode.weight = _nodeBasedGraph->GetEdgeData(e1).distance;
|
||||
edgeBasedNodes.push_back(currentNode);
|
||||
}
|
||||
for(_NodeBasedDynamicGraph::EdgeIterator e2 = _nodeBasedGraph->BeginEdges(v); e2 < _nodeBasedGraph->EndEdges(v); ++e2) {
|
||||
_NodeBasedDynamicGraph::NodeIterator w = _nodeBasedGraph->GetTarget(e2);
|
||||
//if (u,v,w) is a forbidden turn, continue
|
||||
@ -175,9 +185,10 @@ void EdgeBasedGraphFactory::Run() {
|
||||
//create edge-based graph edge
|
||||
EdgeBasedEdge newEdge(edgeBasedSource, edgeBasedTarget, v, nameID, distance, true, false, turnInstruction);
|
||||
edgeBasedEdges.push_back(newEdge);
|
||||
EdgeBasedNode currentNode;
|
||||
|
||||
if(_nodeBasedGraph->GetEdgeData(e1).type != 14 ) {
|
||||
EdgeBasedNode currentNode;
|
||||
|
||||
currentNode.nameID = _nodeBasedGraph->GetEdgeData(e1).nameID;
|
||||
currentNode.lat1 = inputNodeInfoList[u].lat;
|
||||
currentNode.lon1 = inputNodeInfoList[u].lon;
|
||||
|
Loading…
Reference in New Issue
Block a user