Skip to content

stesie/routebot

Repository files navigation

routebot

aka (rb)² - Road Bike Route Bot

This is a (rather naive) random cycling route generator written in TypeScript, based on OpenStreetMap, Overpass API and BRouter.

Track generation works like this

  • based on strived for track length calculate radius
  • based on start point and radius, choose random center point
  • choose five checkpoints on circle around this center point (one being the start point)
  • snap those checkpoints to closes tertiary/unclassified road (using overpass api)
  • use brouter to route from checkpoint to checkpoint
  • eliminate dead ends around checkpoint (i.e. move checkpoint accordingly)

Route Preview

In order to (attractively) publish the route we need a rendered preview of it. Enter Leaflet + Leaflet-GPX to automatically render the route as a webpage. Then use Rendertron to render it to JPG.

Mastodon Bot

Use toot in order to automatically post status updates, including the preview image, to some Mastodon instance.

Demo

See @rbrb@wue.social's Toots for random road bike routes around Würzburg.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published