Code Monkey home page Code Monkey logo

a-mapquest-emulator's Introduction

MeeshQuest: A MapQuest Emulator

This repo contains infamous capstone project for CMSC420 by Dr. Michelle Hugueat, known as "MeeshQuest", at University of Maryland College Park. Overall, it is one of the most challenging course projects for CMSC senior udergrad and graduate students at UMD.

The project wiki: https://wiki.cs.umd.edu/cmsc420/index.php?title=MeeshQuest

MapQuest

Figure 1. MapQuest, an online-mapping service owned by Verizon

The primary motivation of this project was to give students the experience of building portions of a real world application using the data structures and algorithms learned in the data structures class. During the semester students worked independently to implement a stripped down version of MapQuest that is capable of drawing maps of a general area and supporting the following functions: displaying a highlighted route; calculating shortest routes (based on time or distance); generating driving instructions (complete with correct "turn left and then go straight for 2.34 miles" annotations); determining closest points of interest, such as all of the "Internet Cafes" within a 20 mile radius of College Park, MD.

The project comprises four parts, which build upon one another to produce the desired features of an on-line mapping system.

  • Part 0: A warmup on Java language. Implement a data dictionary that supports both city names and city coordinates as keys, using treemap and treeset as the backbone. Write an interpreter that is able of handling basic XML commands.
  • Part 1: Implement a spatial map using a Point Region (PR) quadtree. The role of the spatial map is to support range searches where, given a location in 2-d space and a radius, we will find all the cities within that circle, including on the border. These types of operations are allegedly not efficient using the treemap of coordinates.
  • Part 2: Implement a treap that implements the SortedMap interface with insertion and deletion and use it to replace treemap. Make a PM3 Quadtree to store both cities and roads. Make a road adjacency list for use in finding the shortest path between two cities. Implement Dijkstra's algorithm.
  • Part 3: Implement a PM1 Quadtree and the delete method of PM3 Quadtree for storing cities and roads. Construct a minimum spanning tree using Prim's algorithm.

The PR and PM quadtree are essential to the overall efficiency of the application. The PR quadtree represents a collection of data points in two dimensions by decomposing the region containing the data points into four equal quadrants, subquadrants, and so on, until no leaf node contains more than a single point. A PM quadtree is similar to PR quadtree, but stores lines instead of points and ends up storing both (a line is defined by two points). There are three main classes of PM Quadtrees, which vary depending on what information they store within each black node (see the wiki page). Quadtrees are often used in video games for their blazing fast collision detection.

PR Quadtree

Figure 2. An example of PR Quadtree

PM Quadtree

Figure 3. An example of PM Quadtree

In addition to the data structures, students also implemented the "good old" dijkstra's algorithm for finding shortest paths and Prim's algorithm for finding minimum spanning trees.

All code is in Java. Students put into practice object-oriented design and the Mediator design pattern, which means objects don't communicate directly with each other, but instead communicate through a mediator.

Author

Fan Yang

a-mapquest-emulator's People

Contributors

fyang623 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.