From 1fa61724cde82dc58fcbbf7f582e1916ca570651 Mon Sep 17 00:00:00 2001 From: Thomas Butz Date: Mon, 22 Apr 2024 10:36:20 +0200 Subject: [PATCH] Approximate with DistancePlaneProjection --- .../java/com/graphhopper/routing/lm/LMApproximator.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/graphhopper/routing/lm/LMApproximator.java b/core/src/main/java/com/graphhopper/routing/lm/LMApproximator.java index ef3d780d4cd..068c3719efc 100644 --- a/core/src/main/java/com/graphhopper/routing/lm/LMApproximator.java +++ b/core/src/main/java/com/graphhopper/routing/lm/LMApproximator.java @@ -23,6 +23,7 @@ import com.graphhopper.routing.weighting.WeightApproximator; import com.graphhopper.routing.weighting.Weighting; import com.graphhopper.storage.Graph; +import com.graphhopper.util.DistancePlaneProjection; import java.util.Arrays; @@ -78,8 +79,10 @@ public LMApproximator(Graph graph, Weighting lmWeighting, Weighting routingWeigh this.graph = graph; this.lmWeighting = lmWeighting; this.routingWeighting = routingWeighting; - this.fallBackApproximation = new BeelineWeightApproximator(graph.getNodeAccess(), lmWeighting); - this.beelineApproximation = new BeelineWeightApproximator(graph.getNodeAccess(), routingWeighting); + this.fallBackApproximation = new BeelineWeightApproximator(graph.getNodeAccess(), lmWeighting) + .setDistanceCalc(DistancePlaneProjection.DIST_PLANE); + this.beelineApproximation = new BeelineWeightApproximator(graph.getNodeAccess(), routingWeighting) + .setDistanceCalc(DistancePlaneProjection.DIST_PLANE); this.maxBaseNodes = maxBaseNodes; }