osrm-backend icon indicating copy to clipboard operation
osrm-backend copied to clipboard

Same duration and distance for all modes

Open arsalanses opened this issue 2 years ago • 2 comments

I use Dockerfile blow to create an image with default pbf preloaded on it. But I got same duration and distance for all modes: driving, motorcycle, foot:

curl -s "http://127.0.0.1:5000/route/v1/foot/51.44838,34.80697;51.42098,35.60590?steps=false"
curl -s "http://127.0.0.1:5000/route/v1/motorcycle/51.44838,34.80697;51.42098,35.60590?steps=false"
curl -s "http://127.0.0.1:5000/route/v1/driving/51.44838,34.80697;51.42098,35.60590?steps=false"
FROM osrm/osrm-backend:latest

ARG OSM_FILE=iran-latest.osm.pbf
ARG OSRM_FILE=iran-latest.osrm

ENV OSM_FILE=$OSM_FILE
ENV OSRM_FILE=$OSRM_FILE

COPY ./$OSM_FILE $OSM_FILE

RUN osrm-extract -p /opt/car.lua $OSM_FILE
RUN osrm-extract -p /opt/foot.lua $OSM_FILE
RUN osrm-extract -p /opt/bicycle.lua $OSM_FILE
RUN osrm-partition $OSRM_FILE
RUN osrm-customize $OSRM_FILE

CMD osrm-routed --algorithm mld $OSRM_FILE

EXPOSE 5000

Is there a solution to fix this due to work with all modes?

arsalanses avatar Aug 23 '23 11:08 arsalanses

Yes, run 3 containers with each processing a different mode. You're overwriting the output of osrm-extract each time you call it.

nilsnolde avatar Aug 23 '23 12:08 nilsnolde

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

github-actions[bot] avatar Jun 20 '24 17:06 github-actions[bot]