Skip to content

Atrapfare/route-planner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Route Planner

Shortest-path routing on real road networks, using OpenStreetMap data. Click a source and a target on the map — the route gets computed and drawn instantly.

Requirements

  • CMake 3.16+
  • A C++20 compiler (MSVC, GCC, Clang)
  • A browser

Build

Linux / Mac:

cd backend
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build

Windows:

cd backend
cmake -B build
cmake --build build --config Release

Run

Pass the path to an FMI graph file as the only argument:

Linux / Mac:

./build/routeplanner ./graphs/germany.fmi

Windows:

.\build\Release\routeplanner.exe ..\graphs\germany.fmi

With extra ordner:

.\build\Release\routeplanner.exe ..\graphs\germany.fmi\germany.fmi

Graph files in FMI format can be downloaded from https://fmi.uni-stuttgart.de/alg/research/stuff/

Once the server is running, open your browser at:

http://localhost:8080

Usage

  1. Click anywhere on the map to set the source (green marker).
  2. Click again to set the target (red marker) — the route is computed automatically.
  3. Click Reset to start over.

If you click outside the loaded graph region, an error message will tell you the valid bounds.

About

Web-based route planner using Dijkstra's algorithm on OpenStreetMap road graphs, with a C++ backend and Leaflet.js frontend - only localhost ;)

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages