Skip to content
Pablo Hoch edited this page Aug 15, 2022 · 2 revisions

Preprocessing

  1. Download OpenStreetMapData from http://download.geofabrik.de/ (.osm.pbf format)
  2. (Optional) Download elevation data
  3. Run ppr-preprocess -o path/to/osm-dataset.osm.pbf -g output/path.ppr [--dem path/to/elevation-data]

Demo Web UI

  1. Start the backend: ppr-backend -g output/path.ppr --static path/to/ppr-source-dir/ui/web
  2. Open http://127.0.0.1:9042/

Routing

Select start and destination using the map context menu.

Debugging

Buttons on the left:

  • G (toggle): Show routing graph overlay (only when zoomed in)
  • A (toggle): Show areas in the routing graph overlay
  • VG (toggle): Show visibility graph for areas in the routing graph overlay
  • O: Open current map view on openstreetmap.org (with data layer enabled)
  • G: Open current map view on Google Maps (satellite view)
  • MC: Open current map view on Map Compare
  • M: Open current map view on Mapillary
  • OT: Create an overpass query for the current map view (using overpass turbo wizard syntax)
  • Ex: Show command line to create an extract of the current map view using osmium
  • J: Open current map view in JOSM (JOSM must be running and remote control must be enabled in settings)

Using Docker

Assuming the following directories and files on the host:

  • /srv/ppr/
    • data/
      • germany-latest.osm.pbf
      • srtm/
        • n47_e005_1arc_v3.bil
        • ...
    • docker-compose.yml (see below)

First, run the preprocessing step to generate the ppr routing graph:

docker run --rm -it \
  -v /srv/ppr/data:/data \
  ghcr.io/motis-project/ppr:edge \
  /ppr/ppr-preprocess --osm /data/germany-latest.osm.pbf --graph /data/germany.ppr --dem /data/srtm

Then run the ppr backend using docker compose:

docker-compose.yml:

version: "3.9"
services:
  ppr:
    image: ghcr.io/motis-project/ppr:edge
    ports:
      - "9042:8000"
    volumes:
      - "/srv/ppr/data:/data"
    restart: unless-stopped
    command: "/ppr/ppr-backend -c /data/config.ini"
docker compose up -d
Clone this wiki locally