raupachz / routebot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

License:GNU Affero General Public License v3.0


Languages

Language:TypeScript 86.5%Language:HTML 7.5%Language:Shell 4.2%Language:Dockerfile 1.8%