https://github.com/atrapfare/route-planner
Web-based route planner using Dijkstra's algorithm on OpenStreetMap road graphs, with a C++ backend and Leaflet.js frontend - only localhost ;)
https://github.com/atrapfare/route-planner
cpp dijkstra openstreetmap pathfinding routing
Last synced: 3 months ago
JSON representation
Web-based route planner using Dijkstra's algorithm on OpenStreetMap road graphs, with a C++ backend and Leaflet.js frontend - only localhost ;)
- Host: GitHub
- URL: https://github.com/atrapfare/route-planner
- Owner: Atrapfare
- License: mit
- Created: 2026-03-28T20:55:32.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-03-28T21:49:32.000Z (3 months ago)
- Last Synced: 2026-03-28T22:30:42.716Z (3 months ago)
- Topics: cpp, dijkstra, openstreetmap, pathfinding, routing
- Language: C++
- Homepage: http://localhost:8080/
- Size: 461 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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:**
```bash
cd backend
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build
```
**Windows:**
```bash
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:**
```bash
./build/routeplanner ./graphs/germany.fmi
```
**Windows:**
```bash
.\build\Release\routeplanner.exe ..\graphs\germany.fmi
```
With extra ordner:
```bash
.\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.