Skip to content

eric60/Spring-Elevation-Navigation-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EleNa: Elevation Navigation System

elena

Description

Navigation system for shortest distance path considering minimum and maximum elevation gain.

Resources Used

  • Spring Boot
  • Hibernate
  • PostgreSQL with PostGIS
  • Mapbox GL JS
  • Graph Algorithms
    • A* Search algorithm with elevation gain weighted paths
    • Dijkstra's algorithm
    • Yen's algorithm

How to Run

  1. Install Maven build tool
  2. Import all Maven repositories
  3. Set up database
  4. To Run
    1. Either run EleNaApplication with Intellij
    2. Or from root directory type ./mvnw spring-boot:run
  5. Go to localhost:8080
    • The application will load an in memory Graph object to route from.
    • You must delete the nodes.bin and edges.bin files each time you input new osm data.

Database setup

  1. Download postgres with stackbuilder all default settings port 5432
  2. Launch stackbuilder and download PostGIS under Spatial Extensions
  3. Launch pgadmin4
  4. Create database elenaDb with password 'password'
  5. Go to localhost:8080/importData?path=yourOsmFilePath
    inputting your OSM file path to parse the osm file and input the node and edge values into the elenaDb. Make sure you have forward slashes path1/path2

Adding dependencies

  1. Go to maven repository online and copy and paste the dependency into pom.xml and import them as libraries in intellij

How to Test

Running all unit tests

  1. In root directory type mvn test

Documentation

PostGIS (Geographic Information System) Docs

PostGIS enables geometry and geography data types such as Point which has coordinates and spatial indexing to enable useful queries such as

  1. PostGis DB Intro and query list
  2. Hibernate object relational mapping(ORM) to PostGis DB
  3. Point Java class with coordinate error checking and the same useful methods in PostGIS

Mapbox GL JS Docs

Using MapBox GL JS API to draw customized routes

  • (Lat, Long) pairs
  • Flow
    • user input submit-> get path coordinates from routing -> draw GeoJSON line on map
  1. Fit to the bounds of a linestring
  2. Adding a GeoJSON line
  3. Mapbox directions

Notes

Using LiveReload

  1. Download chrome extension Live Reload
  2. Go to localhost:8080 and click the LiveReload icon to enable it on localhost:8080
  3. Recompile any java file to trigger the live reload so you don't have to restart the server to see changes

About

Navigation system for hikers and bicyclists with max and min elevation preferences

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •