Skip to content

Demonstration of finding the shortest route on a map. Uses the OpenStreetMap libraries.

License

Notifications You must be signed in to change notification settings

ch88251/Route-Planning-Project

Repository files navigation

Route Planning Project

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.

Cloning

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

Project Setup

VSCode Development Container

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

Manual Setup

You'll need the following build tools and libraries installed:

Building, Testing and Running

Building

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

Testing

The testing executable is also placed in the build directory. From within build, you can run the unit tests as follows:

./test

Running

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>

Demonstration

route-planning-demo.mp4

Route Example

References

https://wiki.openstreetmap.org/wiki/Using_OpenStreetMap

https://en.wikipedia.org/wiki/A*_search_algorithm

About

Demonstration of finding the shortest route on a map. Uses the OpenStreetMap libraries.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published