Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exploratory web app #6

Open
8 tasks
dabreegster opened this issue May 10, 2023 · 1 comment
Open
8 tasks

Exploratory web app #6

dabreegster opened this issue May 10, 2023 · 1 comment

Comments

@dabreegster
Copy link

dabreegster commented May 10, 2023

I've started https://github.com/dabreegster/osm2svelte/blob/main/src/lib/modes/RouteProfileMode.svelte in an existing project to explore routing cost functions. (As soon as the Github outage is over, there'll be a deployed link to play with.) You can import any area from Overpass using osm2streets. Then per road segment (edge in the graph), the raw OSM tags (including highway) and processed lane list are available. Those're fed into a calculateWeight function, which returns a rating in [0.0, 1.0]. (Right now it just does something trivial as an example)

The intention is to use this to interactively explore different routing cost functions. Some ideas for next steps (perfectly sized for a one-day hackathon!!):

  • Improve the heatmap / visualization of the cost
  • Implement some different cost functions (from A/B Street, the tag-based linear regression in this repo, attempt to port the routing profiles from common OSS routers, etc)
  • Wire up a Svelte UI to change cost function
  • (For my own interests: prioritize small wiggly alleyways or streets with many nearby amenities, for exploratory walks)
  • Add a simple A -> B router to this, using the specified cost function
  • Explore non-scalar cost functions. Normally Dijkstra would sum up distance * (1 + cost) (with lower cost being a better choice). We could also try avoiding the worst case cost, even if the distance is small, by using Cartesian ordering of tuples in the priority queue.
  • Have a UI to calculate multiple A->B paths, to compare different cost functions
  • Plug in some OD data (bunch of A->B pairs), calculate all the routes according to a cost function, and display the route network

This is effectively a web-based revival of a very old idea, a-b-street/abstreet#237

@dabreegster
Copy link
Author

Finally got it deployed: https://dabreegster.github.io/osm2svelte
Import somewhere, then use the 4th tab

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant