GIScience / openrouteservice

🌍 The open source route planner api with plenty of features.
https://openrouteservice.org
GNU General Public License v3.0
1.43k stars 391 forks source link

ors not using fastest route with fastest weighting #672

Closed TheGreatRefrigerator closed 4 years ago

TheGreatRefrigerator commented 4 years ago

Here's what I did

Forum Link Calculating fastest route from Panguitch ot to Tonopah: http://bit.ly/2SoO0ti

Underlying request: https://api.openrouteservice.org/v2/directions/driving-car/geojson?api_key=xxx

{"preference":"fastest","instructions":true,"geometry":true,"units":"m","attributes":["detourfactor","percentage"],"instructions_format":"html","elevation":true,"coordinates":[[-112.436326,37.824073],[-117.224121,38.053498]],"extra_info":["steepness","waytype","surface"]}

Here's what I got

With a duration of 7h 06min: grafik

Here's what I was expecting

Duration of about 5h 30 min and correct route: grafik

https://goo.gl/maps/XzakZXYxUhcFcZ8g8

Comments

Graphhopper is finding the route just fine (still a duration of 6h 54min): grafik https://graphhopper.com/maps/?point=37.82007%2C-112.446008&point=38.069201%2C-117.230593&locale=de&vehicle=car&weighting=fastest&turn_costs=true&use_miles=false&layer=Omniscale

rabidllama commented 4 years ago

From doing some research looking into the different routes, this is because there is no speed information available in OSM on the roads in the area. That means that the extraterrestrial highway gets given a speed limit of 60km/h as it is tagged as a secondary road. Looking on Wikipedia (https://en.wikipedia.org/wiki/Speed_limits_in_the_United_States) the US is particularly complicated for speed limits as they vary depending on the state.

The Google route gives an average speed of around 100km/h, whereas the ors one is closer to 70km/h, which makes sens with the missing speed limit data. If the OSM data gets updated to include the speed limit, then ors will be able to use it