OpenStreetMap 로고 OpenStreetMap

Routing with OSRM

OpenBrian님이 English로 2017년 5월 19일에 게시함.

Setting up OSRM is very easy because it’s using Docker. Here are the steps to take to set up your own router. You can run this locally or on a server. To see this in action check out https://mappingdc.org/bike-router/.

OSRM on MappingDC

  1. Install Docker on your machine according to instructions for your operating system. https://docs.docker.com/engine/installation/
  2. Download a PBF file for your city from the Mapzen Metro Extracts (https://mapzen.com/data/metro-extracts/). If there is none, sign up and request a new one be built.
  3. Run the backend docker commands from here https://github.com/Project-OSRM/osrm-backend#using-docker This takes about 30 minutes as it precomputes some data.
  4. Run the frontend docker commands from here https://github.com/Project-OSRM/osrm-frontend#using-docker Start the front end with the -e option that specifies the URL to your backend, e.g. http://myhost/osrm-router/
  5. Open ports on your firewall, or set up a proxy in Apache like this:

     # Frontend
     ProxyPass /osrm http://127.0.0.1:9966/
     ProxyPassReverse /osrm http://127.0.0.1:9966/
    
     # Backend
     ProxyPass /osrm-router/ http://127.0.0.1:5000/
     ProxyPassReverse /osrm-router/ http://127.0.0.1:5000/
    
  6. Visit http://myhost/osrm-router/
위치: Mount Vernon, Alexandria, Virginia, United States
이메일 아이콘 Bluesky 아이콘 Facebook 아이콘 LinkedIn 아이콘 마스토돈 아이콘 텔레그램 아이콘 X 아이콘

토론

댓글을 남기려면 로그인하세요