fixed same segment search problem
This commit is contained in:
parent
bd17914eca
commit
313592ebd3
1 changed files with 7 additions and 1 deletions
|
@ -634,6 +634,7 @@ public class RoutingEngine extends Thread
|
|||
pe.originElement = startElement;
|
||||
}
|
||||
}
|
||||
pe.treedepth = 0; // hack: mark for the final-check
|
||||
return pe;
|
||||
}
|
||||
}
|
||||
|
@ -851,8 +852,13 @@ public class RoutingEngine extends Thread
|
|||
OsmNode currentNode = path.getTargetNode();
|
||||
|
||||
long currentNodeId = currentNode.getIdFromPos();
|
||||
if ( sourceNode != null )
|
||||
if ( path.treedepth != 1 )
|
||||
{
|
||||
if ( path.treedepth == 0 ) // hack: sameSegment Paths marked treedepth=0 to pass above check
|
||||
{
|
||||
path.treedepth = 1;
|
||||
}
|
||||
|
||||
long sourceNodeId = sourceNode.getIdFromPos();
|
||||
if ( ( sourceNodeId == endNodeId1 && currentNodeId == endNodeId2 )
|
||||
|| ( sourceNodeId == endNodeId2 && currentNodeId == endNodeId1 ) )
|
||||
|
|
Loading…
Reference in a new issue