Comments (4)
interesting, that looks like a bug to me! the way its supposed to work is that this exception is caught on the c++ side and then wrapped by an error json. what seems to be happening is that its not being caught anymore and bubbling all the way up to python. if we can reproduce we can certainly track it down and fix it so that it does the error handling properly.
now to the larger issue about reproducability on your data versus the server. you are right to expect the same results given the same request. if you had exactly the same data then you certainly should get the same results so likely there is some difference in the data. checking the timestamp on the data shows that it is up to date so now i am wondering where the failure could be. on your side we can narrow it down by removing locations until the route succeeds. that will tell us on which leg of the route the failure occurs. would you be able to give that a shot? narrowing it down to where its failing a bit
from valhalla.
interesting, that looks like a bug to me! the way its supposed to work is that this exception is caught on the c++ side and then wrapped by an error json. what seems to be happening is that its not being caught anymore and bubbling all the way up to python. if we can reproduce we can certainly track it down and fix it so that it does the error handling properly.
Right, I was wondering why the error was a generic RuntimeError
and not something more domain specific.
now to the larger issue about reproducability on your data versus the server. you are right to expect the same results given the same request. if you had exactly the same data then you certainly should get the same results so likely there is some difference in the data. checking the timestamp on the data shows that it is up to date so now i am wondering where the failure could be. on your side we can narrow it down by removing locations until the route succeeds. that will tell us on which leg of the route the failure occurs. would you be able to give that a shot? narrowing it down to where its failing a bit
Simplest passing is to remove all via
points:
{
"costing": "motorcycle",
"costing_options": {
"motorcycle": {
"exclude_polygons": [],
"maneuver_penalty": 5,
"country_crossing_penalty": 0,
"country_crossing_cost": 600,
"width": 1.6,
"height": 1.9,
"use_highways": 0.2,
"use_tolls": 1,
"use_ferry": 1,
"ferry_cost": 300,
"use_living_streets": 0.5,
"use_tracks": 0.8,
"private_access_penalty": 450,
"ignore_closures": false,
"ignore_restrictions": false,
"ignore_access": false,
"closure_factor": 9,
"service_penalty": 15,
"service_factor": 1,
"exclude_unpaved": 0,
"shortest": false,
"exclude_cash_only_tolls": false,
"top_speed": 140,
"fixed_speed": 0,
"toll_booth_penalty": 0,
"toll_booth_cost": 15,
"gate_penalty": 300,
"gate_cost": 30,
"include_hov2": false,
"include_hov3": false,
"include_hot": false,
"disable_hierarchy_pruning": false,
"use_trails": 1
}
},
"exclude_polygons": [],
"locations": [
{
"lon": 15.433902740478517,
"lat": 62.73511203446039,
"type": "break"
},
{
"lon": 14.464616775512697,
"lat": 61.99614966586813,
"type": "break"
}
],
"directions_options": {
"units": "kilometers"
},
"id": "valhalla_directions"
}
I then started to reintroduce them one by one. (I had expected to see it fail on the first via point, but that was not the case)
The second one (that relate to #3 in the Valhalla Demo App) breaks the routing:
{
"costing": "motorcycle",
"costing_options": {
"motorcycle": {
"exclude_polygons": [],
"maneuver_penalty": 5,
"country_crossing_penalty": 0,
"country_crossing_cost": 600,
"width": 1.6,
"height": 1.9,
"use_highways": 0.2,
"use_tolls": 1,
"use_ferry": 1,
"ferry_cost": 300,
"use_living_streets": 0.5,
"use_tracks": 0.8,
"private_access_penalty": 450,
"ignore_closures": false,
"ignore_restrictions": false,
"ignore_access": false,
"closure_factor": 9,
"service_penalty": 15,
"service_factor": 1,
"exclude_unpaved": 0,
"shortest": false,
"exclude_cash_only_tolls": false,
"top_speed": 140,
"fixed_speed": 0,
"toll_booth_penalty": 0,
"toll_booth_cost": 15,
"gate_penalty": 300,
"gate_cost": 30,
"include_hov2": false,
"include_hov3": false,
"include_hot": false,
"disable_hierarchy_pruning": false,
"use_trails": 1
}
},
"exclude_polygons": [],
"locations": [
{
"lon": 15.433902740478517,
"lat": 62.73511203446039,
"type": "break"
},
{
"lon": 15.354852676391603,
"lat": 62.68182547122809,
"type": "via"
},
{
"lon": 15.098090171813967,
"lat": 62.62366757547452,
"type": "via"
},
{
"lon": 14.464616775512697,
"lat": 61.99614966586813,
"type": "break"
}
],
"directions_options": {
"units": "kilometers"
},
"id": "valhalla_directions"
}
But it's not unique either. If I remove the second via point and replace it with the fourth the routing also breaks.
from valhalla.
Btw, the data set I used was fetching https://download.geofabrik.de/europe-latest.osm.bz2
on May 10th.
Then I used osmium extract -p nordics.geojson europe-latest.osm.pbf -o nordics-latest.osm.pbf
to create a smaller data set.
And then the Valhalla docker image to build the graph:
docker run --rm --name valhalla_gis-ops -p 8002:8002 -v %cd%/custom_files:/custom_files ghcr.io/gis-ops/docker-valhalla/valhalla:latest
osmium fileinfo europe-latest.osm.pbf
File:
Name: europe-latest.osm.pbf
Format: PBF
Compression: none
Size: 30604860537
Header:
Bounding boxes:
(-34.49296,29.635548,46.75348,81.47299)
With history: no
Options:
generator=osmium/1.14.0
osmosis_replication_base_url=http://download.geofabrik.de/europe-updates
osmosis_replication_sequence_number=4057
osmosis_replication_timestamp=2024-05-09T20:21:40Z
pbf_dense_nodes=true
pbf_optional_feature_0=Sort.Type_then_ID
sorting=Type_then_ID
timestamp=2024-05-09T20:21:40Z
osmium fileinfo nordics-latest.osm.pbf
File:
Name: nordics-latest.osm.pbf
Format: PBF
Compression: none
Size: 4511998036
Header:
Bounding boxes:
With history: no
Options:
generator=osmium/1.16.0
pbf_dense_nodes=true
pbf_optional_feature_0=Sort.Type_then_ID
sorting=Type_then_ID
from valhalla.
I've found the same error for some car routes in New Zealand that cross the Cook Strait, If both points are far enough from the coast it gives a "No path could be found for input"
error:
- Auckland to Marlborough (working)
- Wellington to Christchurch (working)
- Auckland to Christchurch (failing)
Failing on both the web examples above and our API server running ghcr.io/valhalla/valhalla:latest
with tileset geofabrik: australia-oceania-latest.osm.pbf
from valhalla.
Related Issues (20)
- Debugging reasons for truck re-route HOT 6
- Calculating routes Offline in Android HOT 8
- Transit routing not working HOT 7
- Map matching: `matched_points` are missing in `trace_attributes` `pbf` response (different set of properties in `pbf` and `json`) HOT 2
- Unusal `shape` after Adding `use_lit` in Request HOT 1
- Null Distance and Time but success=true response HOT 3
- Turn-by-Turn Multi-Location Radius Parameter Issue HOT 3
- The route chosen with the top_speed value selects a significantly slower detour HOT 1
- Inconsistency in graph.lua for motor_vehicle_node["official"] HOT 1
- OSM file correctly tiled, yet getting "No data found for location" HOT 2
- Allow pedestrian routing through `highway=via_ferrata` HOT 2
- Question: Obtaining road data for a computed route? HOT 2
- Add language tags to SSML where possible
- Debugging tips? HOT 3
- Memory mapping with multiple threads does not share tile memory HOT 1
- Valhalla not working for US map based tiles HOT 6
- Map Matching API Original Index Reference HOT 3
- Request information on "ProcessTurnLanes" function HOT 3
- sources_to_targets returns incorrect high distances when a source and target are very close HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from valhalla.