Improved public transport map and other route relations

Submitted by plepe on Fri, 08/03/2018 - 23:33

Before starting my project OpenStreetBrowser (which was a long time ago in autumn of 2008) I just wanted to create a public transport map (short: PT map). Creating a PT map is really difficult and creating a usable map is even more difficult. There are several reasons for this, including that OpenStreetMap itself adds a lot of complexity. But it is possible. Back then, my efforts resulted in OpenStreetBrowser 1, but the PT map code didn't last long. History repeated itself 8 years later, as in autumn 2016 - at a time after OpenStreetBrowser has been shut down - I made another attempt to create a PT map (you can still see the result on ptmap.plepe.at). From this code, OpenStreetBrowser 3 (the current version) was born - though with very rudimentary support for route relations: All visible relations would be loaded with their full geometries and displayed on top of each other - regardless of their priority. Now, only the visible parts of relations will be loaded once (even when they are part of several relations) and shown with their relation memberships. So, finally I can present another iteration of public transport maps, this time included in OpenStreetBrowser.

Many things already work:

  • Ways are colored by type of the route relations
  • Popups of stops and ways show list of routes
  • Separate lists for visible stops and visible routes
  • Route popups and details show list of stops

Still, there are some missing parts:

  • Stops with the same name should be grouped and labeled.
  • Directions of routes are not shown.
  • Hide routes which are currently out of service (derived from the opening_hours tag).
  • Take scale of route into account.
  • In route view, stops are not named when the name has to be read from a stop_area relation.
  • Performance optimizations.

Other route relations

As a by-product, also other route relations (cycle routes, hiking, ...) are now much better supported. The following categories have been improved / newly created:

Examples:
Please post ideas and bug reports to the Github issue page!