Giter Club home page Giter Club logo

pathsense's Introduction

pathsense

This module creates routes which are optimized for the chosen transportation mode. Uses omsnx with data tiles from OpenSteetMap to find routes (primary and alternative) between 2 given points.

Since all calculation is done real-time, other data (traffic, user feedback, environment conditions) can be easily integrated simply by including it in the weight calculation function. More transportation modes can also be added easily with new weight functions.

How Does it Work?

  • Supporting a wide region poses the challenge of maintaining low route calculation time.
  • My solution involves utilizing small data tiles, each covering an area of 20 $km^2$, which can be dynamically loaded as required.
  • By analyzing the origin and destination points of a given query, data tiles can be loaded as needed to process the request.
  • This streamlined approach ensures optimal resource utilization even when facing concurrent requests from different regions.

Implemented Modes

  • Gravel cycling โœ…
  • Road cycling
  • Running
  • Hiking

An example of 8 routes, shown with Leaflet, along with their surface metrics. Note how there are so many different paths that are better than what Google will give you (at least for gravel cycling)!

Supported Regions

The area in blue shown below: range_1 calgary

pathsense's People

Contributors

andreytakhtamirov avatar

Stargazers

Chirag Padyal avatar

Watchers

 avatar

pathsense's Issues

Support Road Cycling mode

This mode would prioritize paved roads (by quality), presence of a bike lane, and road width (if a bike lane isn't available, a wider road might be safer than a narrow road).

Data captured in tiles must be different from Gravel Cycling.

Support scalable tile data

The original system of loading tiles as needed is good, but the implementation relied on the tiles being numbered by integer indexes. This made downloading data for specific cities clumsy, as the tiles had to be downloaded sequentially. The new tiling system introduced coordinate-based tile numbering, so tiles could be saved without relying on already existing tiles.

This change requires the graph-building method to find the needed tiles by coordinates instead of by their integer-based index.

Return complete route information

When returning a generated route, we need to include additional route information like the duration, distance, and other metrics. An alternate route can also be returned, calculated using a different weight.

Expand supported region area

Currently an area of only 40km around Waterloo is available. Implementing a tile-based system would help expand coverage and should still be fairly resource-light since only needed tiles can be loaded.

Provide alternative route made with same criteria

Currently the alt route is calculated using an entirely different weight function, giving a route that doesn't always comply by the user's chosen preference ("gravel cycling" selected but route includes only paved roads).

Instead, we should be using the same weight function while filtering out roads already used in the previous route. This would give another route that still matches the preference while being different from the first-shown route.

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.