hardcoded waypoint distance to variable
This commit is contained in:
parent
1886ef1f17
commit
8e008a8d66
3 changed files with 5 additions and 2 deletions
|
@ -79,6 +79,7 @@ public final class RoutingContext
|
|||
public double starttimeoffset;
|
||||
public boolean transitonly;
|
||||
|
||||
public double waypointCatchingRange;
|
||||
|
||||
private void setModel( String className )
|
||||
{
|
||||
|
@ -144,6 +145,8 @@ public final class RoutingContext
|
|||
bikeMode = 0.f != expctxGlobal.getVariableValue( "validForBikes", 0.f );
|
||||
footMode = 0.f != expctxGlobal.getVariableValue( "validForFoot", 0.f );
|
||||
|
||||
waypointCatchingRange = expctxGlobal.getVariableValue( "waypointCatchingRange", 250.f );
|
||||
|
||||
// turn-restrictions used per default for car profiles
|
||||
considerTurnRestrictions = 0.f != expctxGlobal.getVariableValue( "considerTurnRestrictions", carMode ? 1.f : 0.f );
|
||||
|
||||
|
|
|
@ -452,7 +452,7 @@ public class RoutingEngine extends Thread
|
|||
private void matchWaypointsToNodes( List<MatchedWaypoint> unmatchedWaypoints )
|
||||
{
|
||||
resetCache( false );
|
||||
nodesCache.matchWaypointsToNodes( unmatchedWaypoints, 250., islandNodePairs );
|
||||
nodesCache.matchWaypointsToNodes( unmatchedWaypoints, routingContext.waypointCatchingRange, islandNodePairs );
|
||||
}
|
||||
|
||||
private OsmTrack searchTrack( MatchedWaypoint startWp, MatchedWaypoint endWp, OsmTrack nearbyTrack, OsmTrack refTrack )
|
||||
|
|
|
@ -338,7 +338,7 @@ public final class NodesCache
|
|||
|
||||
public void matchWaypointsToNodes( List<MatchedWaypoint> unmatchedWaypoints, double maxDistance, OsmNodePairSet islandNodePairs )
|
||||
{
|
||||
waypointMatcher = new WaypointMatcherImpl( unmatchedWaypoints, 250., islandNodePairs );
|
||||
waypointMatcher = new WaypointMatcherImpl( unmatchedWaypoints, maxDistance, islandNodePairs );
|
||||
for( MatchedWaypoint mwp : unmatchedWaypoints )
|
||||
{
|
||||
preloadPosition( mwp.waypoint );
|
||||
|
|
Loading…
Reference in a new issue