This repo contains the router used by: https://github.com/simfr24/Trainlog to route vehicles
- If using windows then configure WSL - https://learn.microsoft.com/en-us/windows/wsl/install
- Download these dependancies: a. sudo apt install make b. sudo apt install osmium-tool
- Ensure docker is running: https://docs.docker.com/desktop/wsl/
- Run "make train" (or other vehicle type), this will takes ages to download OSM data and process it
- After processing any fales in the "world" directory can be deleted to save space
- Run "make serve-train" (or other vehicle type)
- At https://trainlog.me/ start making a train route as normal, before clicking "submit" open the network view in your browsers setting.
- After clicking submit seatch through the requests to find one to the deployed router. This should look like: "https://trainlog.me/forwardRouting/train/route/v1/train/-1.4621381,53.3783713;-1.548621,53.794414?overview=false&alternatives=true&steps=true"
- Replace the first section with your local router - for example: "localhost:5000/train/route/v1/train/-1.4621381,53.3783713;-1.548621,53.794414?overview=false&alternatives=true&steps=true"
- Copy the Polyline from the geometry value to a site like: https://valhalla.github.io/demos/polyline/?unescape=true&polyline6=false to view it
When finished the router can be stopped using: Docker stop train_routing
If you need to re-install the router delete everything in the Output folder