0

2022年新年快乐!这是我的第一个问题

我按照本教程中描述的说明在 GCP(谷歌云平台)中实现了 OSRM + Vroom 的设置:https ://medium.com/@calroughan/a-beginners-guide-to-installing-osrm-and- vroom-on-gcp-28fbcf1f7857。但就我而言,我使用的是哥伦比亚的地理数据。

所有安装过程都很顺利,我启动并运行了这两个服务。问题:我在 Vroom API 响应中得到错误的结果。

例如,我将这个简单的请求发送到 OSRM 服务:ttp://35.209.254.69:5000/route/v1/driving/4.647868,-74.1134533;4.755680799999999,-74.0236338?overview=simplified&steps=true&geometries=polyline。我得到了这个结果:

{"code":"Ok","routes":[{"geometry":"|awXbnkiL??","legs":[{"steps":[{"intersections":[{"out":0,"entry":[true],"bearings":[106],"location":[-69.859695,-4.219346]}],"driving_side":"right","geometry":"|awXbnkiL??","mode":"driving","duration":0,"maneuver":{"bearing_after":106,"location":[-69.859695,-4.219346],"bearing_before":0,"type":"depart"},"weight":0,"distance":0,"name":"Rua Perimetral Norte Um"},{"intersections":[{"in":0,"entry":[true],"bearings":[286],"location":[-69.859695,-4.219346]}],"driving_side":"right","geometry":"|awXbnkiL","mode":"driving","duration":0,"maneuver":{"bearing_after":0,"location":[-69.859695,-4.219346],"bearing_before":106,"type":"arrive"},"weight":0,"distance":0,"name":"Rua Perimetral Norte Um"}],"distance":0,"duration":0,"summary":"Rua Perimetral Norte Um","weight":0}],"distance":0,"duration":0,"weight_name":"routability","weight":0}],"waypoints":[{"hint":"4dsOgOrwDoAAAAAAXgAAAAAAAACfLAAAAAAAAHiagkIAAAAArrf3RQAAAABeAAAAAAAAAJ8sAACtAQAAkQbW-y6ev_-860YAUx6V-wAA7xEdQq-f","distance":10082832.728969,"name":"Rua Perimetral Norte Um","location":[-69.859695,-4.219346]},{"hint":"4dsOgOrwDoAAAAAAXgAAAAAAAACfLAAAAAAAAHiagkIAAAAArrf3RQAAAABeAAAAAAAAAJ8sAACtAQAAkQbW-y6ev__hkEgALn2W-wAA7xEdQq-f","distance":10083985.308367,"name":"Rua Perimetral Norte Um","location":[-69.859695,-4.219346]}]}

下面的结果是错误的,因为 route[0] 中的距离和持续时间属性为 0。如果我在 osrm 前端演示中执行相同的示例,我得到以下结果: https://map.project-osrm.org/? z=13¢er=4.699297%2C-74.067215&loc=4.646360%2C-74.111818&loc=4.754348%2C-74.022195&hl=en&alt=0&srv=1。您可以在此图像中观看它 OSRM 前端相同的示例

在一个更复杂的路由优化案例中,我观察到非常奇怪的几何形状,例如下一个: 位于哥伦比亚巴兰基亚的初始交付

在使用 vroom 应用路线优化后,这是其中一条路线的结果几何图形

导致其中一条路线的奇怪几何形状

如您所见,这条折线完全没有意义,因为它的大小比最初的交付几何形状大得多

所以,我的问题是:有人遇到过 OSRM 或 Vroom 自托管解决方案的类似问题吗?我可能做错了什么?

我感谢任何使我朝着正确方向解决此问题的建议和/或建议。

4

0 回答 0