Project Title: It's all about Punggol West!
Developing a program to route the shortest path from a selected start point to a selected end point using different modes of transportation. This program only covers a selected area of Punggol West.
This program uses data stored in .json files for the majority of its operations.
JSON files used for this program:
Location Data:
Coordinates for HDB blocks and major landmarks in the area
of interest.
Stored within the Buildings folder.
- General Landmarks Dataset: general_buildings.json
- HDB Landmarks Dataset: residential_buildings.json
MRT Data:
Coordinates for all MRT stations and data on train paths.
Stored within the MRT folder.
- MRT/LRT Stations Dataset: mrt.json
- Entire Punggol West LRT Line Path Dataset: train.geojson
Bus Data:
Coordinates for all bus stops and data on bus services
and the bus routes taken by each of these services.
Also contains additional road coordinates to help the program plot
better paths in a visual format.
Stored in Bus_Stops, Bus_Services and Bus_Path respectively.
- Bus Stops Dataset: bus_stop.json
- Bus Services Dataset: Bus_XX_from.json
- Road Dataset
Combined Data:
A combined data set with major information from each to make accessing
data easier for the program.
Stored within the Combined folder.
- Combined Landmarks + MRT + Bus Datasets: nodes.json
In order to run the application successfully, you are strongly encouraged to download and install the packages listed below:
1. Python 3.x: Python version 3.x or up is required.
Latest version is recommended.
Download from: https://www.python.org/downloads/
2. PyQt5: Python's GUI framework
Run this command through the command line:
pip install PyQt5
3. PyQtWebEngine: A set of Python bindings for The Qt Company’s Qt WebEngine framework.
Run this command through the command line:
pip install PyQtWebEngine
4. Folium: Parsed Open Street Map API to display the Leaflet map in Python.
Run this command through the command line:
pip install folium
5. Haversine: Dynamically calculates the distance (in km) between 2 coordinates that can be used for Dijkstra Algorithm.
Run this command through the command line:
pip install haversine
The main functions of this program:
This program uses Dijkstra's algorithm to determine:
- Shortest Walking Path
- Fastest Bus Path
- Fastest Train Path
This program uses these data structures:
- Ordered Dictionary: To store node information for the paths.
- List: To store relevant node information from our datasets.
These are the websites that we have referenced from during our research & development phase:
- Folium (Python parser to parse map from HTML to Python): https://python-visualization.github.io/folium/
- GeoJSON (Manual plotting of the nodes, area of interest outline, bus service routes): http://geojson.io/
- OneMapSG (Plotting of several residential nodes): https://www.onemap.sg/main/v2/
- PyQt5 (For GUI purposes): https://pypi.org/project/PyQt5/
- Overpass Turbo EU (To query the results to retrieve selected coordinates from Open Street Map: https://overpass-turbo.eu/
- Bus Router SG (Plotting out the bus routes and deciding on bus stop coordinates): https://busrouter.sg/
- Dijkstra Algorithm: https://dev.to/mxl/dijkstras-algorithm-in-python-algorithms-for-beginners-dkc
- Dijkstra's shortest path algorithm: https://www.bogotobogo.com/python/python_Dijkstras_Shortest_Path_Algorithm.php
- How to include Folium map into PyQt5 Window: https://stackoverflow.com/questions/60437182/how-to-include-folium-map-into-pyqt5-application-window