fixed bug for TR near start/end
This commit is contained in:
parent
17aba8d04d
commit
313def7f7c
1 changed files with 4 additions and 2 deletions
|
@ -183,8 +183,10 @@ abstract class OsmPath implements OsmLinkHolder
|
||||||
ele2 = transferNode.selev;
|
ele2 = transferNode.selev;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean isStartpoint = lon0 == -1 && lat0 == -1;
|
||||||
|
|
||||||
// check turn restrictions (n detail mode (=final pass) no TR to not mess up voice hints)
|
// check turn restrictions (n detail mode (=final pass) no TR to not mess up voice hints)
|
||||||
if ( nsection == 0 )
|
if ( nsection == 0 && !isStartpoint )
|
||||||
{
|
{
|
||||||
boolean hasAnyPositive = false;
|
boolean hasAnyPositive = false;
|
||||||
boolean hasPositive = false;
|
boolean hasPositive = false;
|
||||||
|
@ -267,6 +269,7 @@ System.out.println( "bad TR candidate: " + id );
|
||||||
resetState();
|
resetState();
|
||||||
lon0 = -1; // reset turncost-pipe
|
lon0 = -1; // reset turncost-pipe
|
||||||
lat0 = -1;
|
lat0 = -1;
|
||||||
|
isStartpoint = true;
|
||||||
|
|
||||||
if ( recordTransferNodes )
|
if ( recordTransferNodes )
|
||||||
{
|
{
|
||||||
|
@ -290,7 +293,6 @@ System.out.println( "bad TR candidate: " + id );
|
||||||
linkdisttotal += dist;
|
linkdisttotal += dist;
|
||||||
|
|
||||||
// apply a start-direction if appropriate (by faking the origin position)
|
// apply a start-direction if appropriate (by faking the origin position)
|
||||||
boolean isStartpoint = lon0 == -1 && lat0 == -1;
|
|
||||||
if ( isStartpoint )
|
if ( isStartpoint )
|
||||||
{
|
{
|
||||||
if ( rc.startDirectionValid )
|
if ( rc.startDirectionValid )
|
||||||
|
|
Loading…
Reference in a new issue