This project is a Campus Navigation System built in Python with a GUI interface using Tkinter. The system allows users to select a starting point and destination from a dropdown menu, displaying the shortest path between them on a campus map. This project uses Dijkstra's Algorithm for efficient pathfinding and reads coordinates from an external file, making it customizable for different campus layouts.
- Marker Display: Visualizes important campus locations and paths on a map.
- Shortest Path Calculation: Uses Dijkstra's Algorithm to determine and highlight the shortest route between two selected points.
- History Log: Records previously selected routes with an option to view or clear the history.
- Dropdown Menu: Easy selection of starting and ending points from a predefined list of locations.
- Customizable Map and Coordinates: Loads coordinates from an external file (
coords.txt), enabling easy customization for different maps and locations.
- Python 3.x
- Tkinter (usually included with Python installations)
-
Clone the repository:
git clone https://github.com/username/repository-name.git cd repository-name -
Place the
coords.txtfile in the project directory. This file should contain coordinates and path definitions. -
Run the main script:
python main.py
main.py: Main script to run the navigation system.coords.txt: Contains location and path coordinates for map markers.map.png: Map background image used in the canvas display.history.txt: Stores history of previous routes selected.
The coords.txt file should follow this structure:
- Locations:
Location: <Location Name> (x, y) # Optional Description - Paths:
Path: <Path Name> (x1, y1) (x2, y2) ...
- Loading Coordinates: The
ParseFilefunction reads location and path coordinates fromcoords.txtand organizes them into lists. - Pathfinding:
GetPathLengthcalculates the shortest path using Dijkstra’s algorithm, leveraging the parsed data as nodes and edges in a graph. - UI Components: Tkinter is used to build the UI, with buttons, dropdowns, and dynamic path highlighting.
- Real-time GPS integration for live location tracking.
- Expanded map customization with zoom and pan functionalities.
- Improved pathfinding algorithms to handle larger maps.