This is a Python project that uses geographical data to create a grid-based path planner. The project allows you to generate a grid over geographical data like a polygon boundary and polygon obstacles, create a graph from the grid, and find the shortest path from a start point to an end point using the A* algorithm.
The Grid-Based Path Planner has the following features:
- Generate a customizable vector grid over geographical data.
- Create a graph from the grid where each node represents a cell and each edge represents adjacency between two cells.
- Find the shortest path from a start point to an end point using the A* algorithm.
- Visualize the grid and the path.
To run this project, you need Python 3.x installed on your computer. You can download the latest version of Python from the official website: https://www.python.org/downloads/
You will also need to install the following packages:
- os
- math
- geopandas
- networkx
- matplotlib
- shapely
You can install these packages using pip:
pip install geopandas networkx matplotlib shapely
To use the Grid-Based Path Planner, run the main.py
file in your favorite Python environment or from the terminal with the command python main.py
.
The script will display a menu with the available options. You can select an option by entering the corresponding number.
- To load polygons and obsacles in .geojson from the data folder select 1)
- To generate a grid from the loaded data, select option 2) and follow the prompts.
- To find the shortest path from a start point to an end point, select option 3 and follow the prompts.
- To exit select option 4)
Contributions are welcome! If you would like to contribute to this project, please fork this repository, make your changes, and submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.