2

I installed the osrm-backend locally, following this steps, but it is not working. https://github.com/Project-OSRM/osrm-backend/wiki/Running-OSRM

When I visit the official .org site the data is loaded perfectly:

URL:

http://router.project-osrm.org/route/v1/car/23.6077766,46.5757364;23.6120221,46.5729466?overview=false

Data:

{"routes":[{"legs":[{"summary":"","weight":522.6,"duration":311,"steps":[],"distance":1843.4}],"weight_name":"routability","weight":522.6,"duration":311,"distance":1843.4}],"waypoints":[{"hint":"UFEPhSXRvoUAAAAAWQEAAIkOAAAsGAAAAAAAALUA5kIZKJtElsQZRQAAAACsAAAARQcAABgMAACFqAAAiiBoARrExgLhOWgBeLDGAhMA3wLm2fWB","name":"","location":[23.60129,46.580762]},{"hint":"5n0zhvV9M4YAAAAAOwAAAAAAAADpAgAAAAAAAPhS60EAAAAAkye8QwAAAAA7AAAAAAAAAOkCAACFqAAApQ5oAZCmxgJ2SmgBk6XGAgAArw7m2fWB","name":"","location":[23.596709,46.5732]}],"code":"Ok"}

When I call through my server the route is not calculated:

URL:

http://127.0.0.1:5000/route/v1/car/23.6077766,46.5757364;23.6120221,46.5729466?overview=false

Data:

{"code":"Ok","routes":[{"legs":[{"steps":[],"distance":0,"duration":0,"summary":"","weight":0}],"distance":0,"duration":0,"weight_name":"routability","weight":0}],"waypoints":[{"hint":"BkcbgAdHG4AAAAAAIgAAAAAAAADqAAAAAAAAAIsXvkEAAAAAPcwvQwAAAAAiAAAAAAAAAOoAAAAsDACAVqER_k-Mxf_hOWgBeLDGAgAA3wvf10mB","name":"Rua Joaquim Ferreira","location":[-32.399018,-3.830705]},{"hint":"BkcbgAdHG4AAAAAAIgAAAAAAAADqAAAAAAAAAIsXvkEAAAAAPcwvQwAAAAAiAAAAAAAAAOoAAAAsDACAVqER_k-Mxf92SmgBk6XGAgAA3wvf10mB","name":"Rua Joaquim Ferreira","location":[-32.399018,-3.830705]}]}

I downloaded the brazil-latest.osm.pbf file and performed the procedures with this file.

I'm using:

Linux Ubuntu: 16.04

8 CPU and 65 GB RAM

OSRM: v5.18.0

File: brazil-latest.osm.pbf

Command to run:

sudo osrm-routed --algorithm = MLD brazil-latest.osrm
Alexander Farber
  • 21,519
  • 75
  • 241
  • 416

1 Answers1

1

You downloaded the brazil-latest.osm.pbf, but the latitude and longitude you query are not within the extent of your map data. You can change the longitude and latitude of the query or change the map.

giser_yugang
  • 6,058
  • 4
  • 21
  • 44
  • Yes, good catch - [the location](https://www.openstreetmap.org/#map=12/23.6078/46.5778) Danilo is trying to use as the starting point is outside of Brazil – Alexander Farber Apr 29 '23 at 07:22