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.
This commit is contained in:
Nils 2023-11-29 13:06:41 +01:00 committed by GitHub
parent 45f0589e62
commit 9f704f1d4e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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: {