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.originElement = startElement;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
pe.treedepth = 0; // hack: mark for the final-check
|
||||||
return pe;
|
return pe;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -851,8 +852,13 @@ public class RoutingEngine extends Thread
|
||||||
OsmNode currentNode = path.getTargetNode();
|
OsmNode currentNode = path.getTargetNode();
|
||||||
|
|
||||||
long currentNodeId = currentNode.getIdFromPos();
|
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();
|
long sourceNodeId = sourceNode.getIdFromPos();
|
||||||
if ( ( sourceNodeId == endNodeId1 && currentNodeId == endNodeId2 )
|
if ( ( sourceNodeId == endNodeId1 && currentNodeId == endNodeId2 )
|
||||||
|| ( sourceNodeId == endNodeId2 && currentNodeId == endNodeId1 ) )
|
|| ( sourceNodeId == endNodeId2 && currentNodeId == endNodeId1 ) )
|
||||||
|
|
Loading…
Reference in a new issue