Project-OSRM / osrm-backend

Open Source Routing Machine - C++ backend
http://map.project-osrm.org
BSD 2-Clause "Simplified" License
6.42k stars 3.4k forks source link

Fragmented route generation on osrm-routed #6942

Open csotiMatyas opened 5 months ago

csotiMatyas commented 5 months ago

Hey we are running the docker image on linux ( i dont know the distro ), but i tried this on my mac as well, both the osrm-routed and the nodejs binding.

When using the nodejs binding this does not happen!

When using osrm-routed with MLD ( extract -> partition -> customize ), europe-latest from https://download.geofabrik.de/europe.html, the generated route is:

  1. Fragmented.
  2. The higher the coordinate count in a url, the worse it gets. We are currently double generating a route, first with 20 per url then we feed the result back to osrm-routed with 100 per url. ( Which is bloody wasteful ).

Here is a url: ${process.env.NEXT_PUBLIC_OSRMURL}/match/v1/driving/${coordinates.join(';')}?overview=full&radiuses=${radiuses.join(';')}&timestamps=${timestamps.join(';')}&tidy=true&gaps=ignore

We are using radiuses and timestamps as well. Running version 5.26.0.

BONUS QUESTION What is the intended way of using this service with a big load, up to 30K+ coordinates? I have seen mentions that the osrm-routed is only for "prototyping / dev / small load" but could not find anything "official" Feeding 10K coordinates with a URL, resolved in 200 seconds!!!. While i was able to feed 9K coordinates into nodejs binding and it took around 5600ms on average to resolve.

2000 coordinates / URL 2000coords-url

1000 coordinates / URL 1000coords-url

500 coordinates / URL 500coords-url

100 coordinates / URL 100coords-url

20 coordinates / URL 20coords-url