Navigation system for shortest distance path considering minimum and maximum elevation gain.
- 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
- Install Maven build tool
- Import all Maven repositories
- Set up database
- To Run
- Either run EleNaApplication with Intellij
- Or from root directory type
./mvnw spring-boot:run
- 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.
- Download postgres with stackbuilder all default settings port 5432
- Launch stackbuilder and download PostGIS under Spatial Extensions
- Launch pgadmin4
- Create database elenaDb with password 'password'
- 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
- Go to maven repository online and copy and paste the dependency into pom.xml and import them as libraries in intellij
Running all unit tests
- In root directory type
mvn test
PostGIS enables geometry and geography data types such as Point which has coordinates and spatial indexing to enable useful queries such as
- ST_Distance(geography, geography) returns double
- Distance between 2 points
- ST_Buffer(geography, float8) returns geography
- Buffer that returns all points less than or equal to the distance of the radius of the buffer
- PostGis DB Intro and query list
- Hibernate object relational mapping(ORM) to PostGis DB
- Point Java class with coordinate error checking and the same useful methods in PostGIS
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
- PostGIS point is longitude, latitude
- Mapbox point is reversed with latitude, longitude
- Mapbox vs Leaftlet vs OSM
- Download chrome extension Live Reload
- Go to localhost:8080 and click the LiveReload icon to enable it on localhost:8080
- Recompile any java file to trigger the live reload so you don't have to restart the server to see changes