diff --git a/brouter-core/src/main/java/btools/router/RoutingEngine.java b/brouter-core/src/main/java/btools/router/RoutingEngine.java index 1424c30..bcb84b1 100644 --- a/brouter-core/src/main/java/btools/router/RoutingEngine.java +++ b/brouter-core/src/main/java/btools/router/RoutingEngine.java @@ -742,7 +742,7 @@ public class RoutingEngine extends Thread OsmPath startPath = routingContext.createPath( startLink ); startLink.addLinkHolder( startPath, null ); - if ( wp != null ) wp.radius = 5.; + if ( wp != null ) wp.radius = 1.5; return routingContext.createPath( startPath, link, null, guideTrack != null ); } @@ -1064,7 +1064,7 @@ public class RoutingEngine extends Thread { if ( isFinalLink ) { - endPos.radius = 5.0; + endPos.radius = 1.5; // 1.5 meters is the upper limit that will not change the unit-test result.. routingContext.setWaypoint( endPos, true ); } OsmPath testPath = routingContext.createPath( otherPath, link, refTrack, guideTrack != null ); @@ -1075,7 +1075,10 @@ public class RoutingEngine extends Thread } finally { - routingContext.unsetWaypoint(); + if ( isFinalLink ) + { + routingContext.unsetWaypoint(); + } } } if ( bestPath != null )