Project-OSRM / osrm-backend

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

OSRM distance table calls are returning duration table #6226

Open rumirras opened 2 years ago

rumirras commented 2 years ago

Hey folks,

I built my own OSRM service and I'm currently using it quite extensively for duration matrix requests. However, I need to add some front-end functionality that deppends on distances.

My first thought was to leverage the simple "annotations" attribute as follows:

**http://router.project-osrm.org**/table/v1/driving/-9.1078027,38.7570457;-8.6532477,41.1163392;-9.248158,38.711381?annotations=distance

This works quite well. However, when I switch it to my private service, the response comes with the "durations" matrix instead of the "distance" one. My request is being done exactly in the same way I'm doing the previous one, just changing the Host:

**<MY_HOST>**/table/v1/driving/-9.1078027,38.7570457;-8.6532477,41.1163392;-9.248158,38.711381?annotations=distance

Some context info:

danpat commented 2 years ago

Are you running at least OSRM 5.18 locally? The annotations feature was only added then: https://github.com/Project-OSRM/osrm-backend/blob/master/CHANGELOG.md#5180

rumirras commented 2 years ago

@danpat, this is my Dockerfile:

`##Dockerfile## FROM osrm/osrm-backend EXPOSE 5000 RUN apt update && apt install -y wget && mkdir -p /data && cd /data && wget http://download.geofabrik.de/europe/portugal-latest.osm.pbf

above is the data feeding step which is required from url [1]

ADD script.sh /opt ENTRYPOINT ["/bin/bash", "/opt/script.sh"]

`

I thought this was getting the latest automatically, no?

rumirras commented 2 years ago

Hi all! Can you please help here. I don't understand why this is not working. It seems to be an actual bug in the implementation. I already tried to force the version and can't get the distance table out of the service.

github-actions[bot] commented 3 weeks ago

This issue seems to be stale. It will be closed in 30 days if no further activity occurs.