The route planning project demonstrates the use of C++ with Open Street Map (OSM). It uses the A* Search algorithm to plot the shortest path on a map using starting and ending coordinates.
When cloning this project, be sure to use the --recurse-submodules
flag. Using HTTPS:
git clone https://github.com/ch88251/Route-Planning-Project.git --recurse-submodules
This repository contains a VSCode development container. If you're using VSCode as your code editor, you can simply launch VSCode and then open the project in the container. If you're not familiar with how this works you should read this:
https://code.visualstudio.com/docs/devcontainers/containers
You'll need the following build tools and libraries installed:
- make
- cmake
- gcc/g++
- IO2D (https://github.com/cpp-io2d/P0267_RefImpl/blob/master/BUILDING.md)
To compile the project, first, create a build
directory and change to that directory:
mkdir build && cd build
From within the build
directory, then run cmake
and make
as follows:
cmake ..
make
The testing executable is also placed in the build
directory. From within build
, you can run the unit tests as follows:
./test
The executable will be placed in the build
directory. From within build
, you can run the executable as follows:
./OSM_A_star_search
Or to specify a map file:
./OSM_A_star_search -f ../<your_osm_file.osm>