Skip to content

Large scale GIS Mapping system project created using GTK and C++ at the University of Toronto

Notifications You must be signed in to change notification settings

HarshitSohaney/Mapper-65

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 

Repository files navigation

Mapper-65

Large scale GIS Mapping system project created using C++ and OpenStreetMap at the University of Toronto.

The source code for the project cannot be made public due to Academic Offense policies at the University of Toronto. This Repository only contains a demo of the Mapper Project that I created along with teammates Srinidhi Shankar and Prarthona Paul.

Contents

Software Development Information

Languages and Tools

  1. C++
  2. GTK (GUI development)

Programming Paradigm - OOP

  1. Extensively used Structs to create various objects for elements like features, points of interest and path tracing data.
  2. Created separate header files to split milestone global variables.
  3. Abstraction was implemented with functions that were used for streets, features, and pathfinding.

Data Structures

STL structures used:

  1. Vector
  2. List
  3. Unordered Map
  4. Priority Queue
  5. Multi Map

Dynamically allocated arrays were used for optimization purposes.

Milestones

The project was split into four milestones:

  1. Data loading
  2. GUI implementation
  3. Path Finding Algorithms - A star and Dijkstra's
  4. The Travelling Salesman Problem

The team kept track of various tasks during these milestones through a wiki page and a Trello workflow.

My contribution to the project over the semester (14 weeks):

image

OpenStreetMap

The project used the OpenStreetMap database to parse geographic data. The course team converted XML files to binary files for efficient data accessing. Data was processed using various keywords and structures based on OSM standards.

Reference: https://wiki.openstreetmap.org/wiki/Main_Page

Mapper-65 Demonstration

The Go Green Initiative

The map was created with climate impact in mind. The team hopes to expand route finding to subways and buses in order to promote greener traveling. Transit paths will be given precedence and greener roadways will be highlighted when presenting paths to users. A carbon footprint approximate will be calculated and displayed to the user. Additionally, the map includes various Points Of Interest that promote greener methods of travel:

  1. Bicycle Rentals
  2. Electric Vehicle Charging
  3. Recycling Bins

Constant Complexity Data Access

Various data loading functions were created to load important OSM information into data structures. Functions were evaluated based on O complexity analysis

GUI Features

Transit

Users can choose to see transit options in a city by clicking on the transit button. The paths were laid out using the OSM database keys for subways and buses, giving accurate paths.

NewYork_transit

Multiple Maps

Maps are loaded in a function through OSM XML map files converted into binary files. Users can change maps and explore different cities around the world. Some maps included are:

  1. Toronto
  2. New York
  3. Sydney
  4. Singapore
  5. New Delhi
  6. Hong Kong
  7. Tokyo

Points Of Interest Selection

When searching for POIs, users can select what POIs they want to see from a drop-down menu. All categorized POIs in the users' search area will appear and as the user zooms out, those are the ones that remain. This was a design decision made to keep POI querying fast and intuitive. If POIs are not present on the user's screen, the nearest POIs are displayed as the user looks around.

[email protected]

Search Bar Integration

The search bar was created using the GTK search bar widget. It supports partial street name inputs and gives suggestions and autocompletes. Users can query partial street names and press enter, the search will consider all possible streets and find common intersections.

Toronto_searchBar

Dark Mode

A dark mode feature allows eye comfort based on brightness.

Singapore_LightSingapore_darkMode

Navigation Mode

The map turns green when in navigation mode. A navigation bar provides important information about the selected from and to, and has an additional feature to swap the two immediately. Detailed directions are presented in a text box on the right, and the path is highlighted as the user goes through the directions.

[email protected]

Help Page

A help page was created using HTML/CSS to give users instructions on how to use the map.

[Git Repo] (https://github.com/PrarthonaPaul/Mapper_Instructions)

Path Finding

Three algorithms were used to achieve navigation on the map. Breadth-First Search was implemented as an initial solution and then iterated upon.

  1. Dijkstra's Algorithm

Dijkstra's algorithm was implemented using a min-heap (priority queue). The following video demonstrates Dijkstra's algorithm working on our map. The highlights are just a visualization tool to see the algorithm working (the actual finding is much quicker than that demonstrated through the highlights). Dijkstra's algorithm uses wavefronts to explore all paths until it finds the best one to the destination. These wavefronts are circular and expand outwards from the source.

[email protected]
  1. A Star Algorithm

A Star algorithm was implemented by making slight adjustments to Dijkstra's by including a new dimension of estimation - time remaining. The algorithm was significantly faster for single-source single destination searches. The visualization shows how the algorithm moves in a more focused direction rather than a circular wavefront.

[email protected]

The Travelling Salesman Problem

The final milestone of the project was related to coding an acceptable solution to the Travelling Salesman Problem using various heuristics. For background, the Travelling Salesman Problem is an NP-complete problem relating to finding the shortest path for given pick-ups and deliveries. Dijkstra's algorithm was expanded to find paths to multiple destinations from a source, all at once. Multi-Destination Dijkstra's, coupled with a greedy algorithm gave an initial solution.

In order to improve our result path, we iterated through multiple pickup points and implemented a simple multi-start. Additionally, we implemented local perturbations through 2-opt, which improved our results by testing various different swaps between path links. This perturbation operation was used in our Simulated Annealing algorithm.

Simulated Annealing Result from our TSP solution implementation:

Toronto_searchBar

The graph represents how our TSP solution utilized simulated annealing for two different start points. The y axis is the total path time and the x axis is a new iteration for a path.

Demonstration of a greedy algorithm that takes the nearest neighbor:

Nearestneighbor (1)

For more information on the Travelling Salesman Problem (src): https://en.wikipedia.org/wiki/Travelling_salesman_problem

About

Large scale GIS Mapping system project created using GTK and C++ at the University of Toronto

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published