Navigation systems optimize for the shortest or fastest route. However, they do not consider elevation gain. Let’s say you are hiking or biking from one location to another. You may want to literally go the extra mile if that saves you a couple thousand feet in elevation gain. Likewise, you may want to maximize elevation gain if you are looking for an intense yet time-constrained workout.
This repository introduces a navigation system that maximizes or minimizes elevation gain within x% of the shortest path.
-Road Data:
OpenStreetMap,
Open-Elevation,
Tag Filtering (Note: demanding/difficult alpine hiking routes excluded)
-Database:
OSM2PGSQL,
PostgreSQL (v15) with
PostGIS extension (v3.3)
-Language: C++17
-Dependencies:
Libpqxx (v6.4.5),
Crowcpp (v1.0+5 Security Patch),
HTTPRequest,
Boost Libraries (v1.81.0)
-Languages and Packages: HTML5, JavaScript,
Leaflet,
Font Awesome
-Leaflet plugins:
L.EasyButton,
Leaflet.Awesome-Markers,
leaflet-sidebar-v2,
Leaflet.contextmenu,
leaflet-distance-markers,
Control.GeoCoder
-Tile layers:
OpenStreetMap default,
Carto maps,
Google maps
- Tarjan's strongly connected graph
- BallTree algorithm: search nearest node, search two random near node
- Dijkstra's algorithm
- Genetic algorithm for elevation minimization
- Genetic algorithm for elevation maximization
- Buttons on map: Tile layer switch, Zoom in/out, Location search by text
- Mouse on map: Marker dragging, show coordinates (right bottom)
- Context menu (right click): set start marker here, set end marker here, add checkpoint here, remove checkpoint, etc
- Sidebar:
- Project introduction
- Checkpoint table: add/remove checkpoints, locate each checkpoints, search path individually, set coordinates, set max length ratio
- GitHub link
- Various settings
- Transportation type: (select one)
- Hiking
- Cycling
- Cycling with road restrictions
- Paths to show:
- Shortest path
- Minimize elevation gain
- Maximize elevation gain
- Target computation time: (select one)
- Default
- 2, 5, 15, 30, 60, 120 seconds
- Duplicate edge policy between two locations: (select one)
- Allow duplicate edges
- Minimize duplicate directed edges
- Minimize duplicate edges
- Automatic path search on:
- Marker drag
- Marker remove
- Show path checkbox
- Checkpoint table change marker order: (select one)
- Drag and drop
- Drag and switch
- Max Length Ratio:
- Use same value for each checkpoint
- Recalculate path:
- Allow recalculating path searches
- Show distance:
- Show distance marker along the path