Route generated by ORS is significantly longer than Google Maps for the same locations (Riyadh, Saudi Arabia)

  • ORS Result: 5.9 km – around 6 minutes
  • Google Maps Result: 2.3 km – around 3 minutes (via King Abdul Aziz Branch Rd)

From visual inspection, Google Maps picks a shorter, more direct road through residential streets, while ORS takes a longer external route along the main road.

I understand ORS relies on OpenStreetMap data, but is there any way (via request parameters or routing preferences) to make the ORS route behave more like Google’s shorter option?

For example:

  • Should I use "preference": "shortest" instead of "fastest"?
  • Can I adjust "maximum_speed" or other parameters to discourage long detours on highways?
  • Is this a data issue in OSM for this specific area?

I’ve attached comparison screenshots for clarity.

Any guidance or parameter tuning suggestions would be appreciated!

curl --location 'http://ors-dev.suhail.ai:8080/ors/v2/matrix/driving-car' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ****' \
--data '{
  "locations": [
    [ 46.59943840509176, 24.907529306139324],
    [ 46.60296827539301, 24.906069701451187],
    [ 46.60473047427723, 24.911566019920585],
    [ 46.607737687743736, 24.910395469936603],
    [46.618946064606064, 24.912820817163635] 
  ],
  "sources": [0],
  "destinations": [1, 2, 3, 4],
  "metrics": ["duration"],
  "units": "m"
}'

#openrouteservice openrouteservice > directions Maps Website #driving-car

Hi @yshaksh,

it seems that the issue is to do with how the roads are mapped in OSM, in that a lot of junctions only connect to one direction (see image below). As ors only uses the connections between roads that are present in OSM, it won’t be able to a more direct route.

2 Likes

Dear @adam ,

Thank you very much for your response and for the illustration.