From 9f704f1d4ec0bf5685939aa4f5cb9fb6854a24bc Mon Sep 17 00:00:00 2001 From: Nils Date: Wed, 29 Nov 2023 13:06:41 +0100 Subject: [PATCH 1/1] Use 5 meter radius for input locations in Valhalla This will search for road segments within 5 meter radius of the input location and choose the best path from/to whichever segment gives the cheapest cost. It should be preferable in most scenarios compared to simply snapping to the closest segment. I'll do the same PR for our web app at https://github.com/gis-ops/valhalla-app. --- app/assets/javascripts/index/directions/fossgis_valhalla.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/index/directions/fossgis_valhalla.js b/app/assets/javascripts/index/directions/fossgis_valhalla.js index 0bf6a3a8d..d44dbd12b 100644 --- a/app/assets/javascripts/index/directions/fossgis_valhalla.js +++ b/app/assets/javascripts/index/directions/fossgis_valhalla.js @@ -53,7 +53,7 @@ function FOSSGISValhallaEngine(id, costing) { data: { json: JSON.stringify({ locations: points.map(function (p) { - return { lat: p.lat, lon: p.lng }; + return { lat: p.lat, lon: p.lng, radius: 5 }; }), costing: costing, directions_options: { -- 2.39.5