按照以下步骤,我在本地安装了osrm-backend,但无法正常工作。 https://github.com/Project-OSRM/osrm-backend/wiki/Running-OSRM
当我访问.org官方网站时,数据已完美加载:
URL:
数据:
{"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"}
当我通过服务器呼叫时,不会计算路线:
URL:
http://127.0.0.1:5000/route/v1/car/23.6077766,46.5757364;23.6120221,46.5729466?overview=false
数据:
{"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]}]}
我下载了brazil-latest.osm.pbf文件,并对该文件执行了操作。
我正在使用:
Linux Ubuntu:16.04
8个CPU和65 GB RAM
OSRM:v5.18.0
文件:brazil-latest.osm.pbf
要运行的命令:
sudo osrm-routed --algorithm = MLD brazil-latest.osrm
有人可以帮我吗?
非常感谢。 达尼洛
答案 0 :(得分:0)
您下载了brazil-latest.osm.pbf,但是查询的纬度和经度不在地图数据范围内。您可以更改查询的经度和纬度,也可以更改地图。