Giter VIP home page Giter VIP logo

routeplanner's Introduction

FMI Maps


FMI Maps

FMI Maps, a University of Stuttgart course project, leverages Javalin, a Java web framework, to serve both the frontend and API endpoints. A custom Dijkstra algorithm implementation handles route calculation, with data provided by the University of Stuttgart's Institute for Formal Methods in Computer Science. The graph for the Germany road network contains around 25 million nodes and 50 million edges. Routes are visualized using GeoJSON and the Leaflet JavaScript library.

โœจ Features

  • Nearest Node Search

    • Select a start and end point on the map by clicking on it.
    • You may also enter the coordinates manually or search for a place name or address.
    • For the selection of the start point, you can also use your current location.
    • We will always find the nearest node to your selection.
  • Route Calculation

    • After start and end point are selected, you can calculate the route.
    • The route will be calculated using a custom Dijkstra algorithm implementation.
    • Depending on the distance, the calculation may take a few seconds.
    • On an M1 Pro MacBook Pro, the one-to-all Dijkstra takes 8696ms to calculate.
  • Route Visualization

    • After the route is calculated, it will be displayed on the map as a blue line using GeoJSON.
    • In the upper right corner of the map, you can open the DevView to get more information about the route, like startNodeID, endNodeID, distance and calculation time.
    • If an error occurs during the calculation or the nearest node search, you will get an error message displayed on the map.
  • One-to-All Dijkstra

    • You can also calculate the shortest path from a single node to all other nodes.
    • This however cannot be done using the frontend. You must use the code interface provided by the Dijkstra class.
    • Please use the Method shortestPath(int start, int end) with the arguments <YOUR_START_NODE_ID> and -1 within the Dijkstra class. The -1 will make sure that the algorithm will calculate the shortest path to all other nodes without stopping early.
    • Now you can use the getAllRouteTo(int EndNode) method to get the shortest path from the start node to any point you desire with the distances and predecessors you just calculated.
  • Dark Mode

    • Most importantly, we added a hacky looking dark mode to the website.
    • You can toggle the dark mode by clicking on the moon icon in the upper right corner.
    • The map is still loading the tiles normally from OpenStreetMap. However we are using a custom stylesheet to edit the colors using a filter which is layered on top of the map.

๐Ÿ“ท Images

FMI Maps FMI Maps
FMI Maps

๐Ÿ”ง Configuration

To execute the project as required by the course, you need to do the following:

  • Install Java with Maven.
  • Clone the repository.
  • Download the graph data (germany.fmi.bz2) from the FMI and the benchmark data from here.
  • Place the extracted files (germany.fmi, germany.que and germany.sol) in the root directory of the project.
  • Increase the JVM heap size to 6GB. (On Linux and MacOS, you may use export MAVEN_OPTS="-Xmx6g", on Windows, you may use set MAVEN_OPTS="-Xmx6g".)
  • cd into the project directory.
  • Run mvn compile.
  • Run the benchmark with mvn exec:java -Dexec.mainClass="com.gruettecloud.www.Benchmark" -Dexec.args="-graph germany.fmi -lon 9.098 -lat 48.746 -que germany.que -s 638394".
  • If you'd like to use the GUI, run mvn exec:java -Dexec.mainClass="com.gruettecloud.www.App". The web app will be available at http://localhost:7070/.

โœ๏ธ Authors

routeplanner's People

Contributors

knuther avatar xelemir avatar

Stargazers

 avatar  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.