protomaps-leaflet icon indicating copy to clipboard operation
protomaps-leaflet copied to clipboard

Add public transport to basic style

Open severak opened this issue 3 years ago • 1 comments

This change adds public transport (railways, trams and subways) to map. Railway stations are shown in bigger font size and more distinct colours than other POIs.

Colours of these added features are subject to change - I just choose semi-random colors from LazPaint (image editing program) palette.

Also it would be nice to be able to disable subways at all (outside of styles) to be able to style them according to local habits (specific to each city/subway system). Also - it seems there is some convention to tag metro routes with colors to enable rendering of metro lines by color - e.g. this one, it would be nice to have color on metro lines (looks like protomaps can use it if colour is in data).

I also added displaying of small rivers (waterway=river) and on zoom > 15 even streams.

For better displaying of public transport I have these suggestions on underlaying data changes:

  • include railway=rail on zoom < 13 (even zoom=10 - railway lines are major landmarks)
  • include railway stations on zoom < 16 (something like zoom=13 makes sense to me)
  • include also railway=halt (those are smaller form of railway stations)
  • be able to differentiate subway and railway stops (this may be mess in data, not preprocessing)
  • bonus point: include tram stops (railway=tram_stop) and bus stops (highway=bus_stop), but rules are more comples

See screenshots:

prague-railways-trams-metro

praha-metro-railways-trams-negative

metro-and-railway-stations

stanice-pozitiv

streams

severak avatar Jul 12 '22 22:07 severak

@severak thanks for the PR! Aside from the underlying data changes to the vector tiles I see two paths here:

  1. the "default" style is meant as a minimum style usable for the majority of applications, I think visualizing the transit layer is valuable if we can get it visually consistent so it looks like a neutral basemap

  2. otherwise, the protomaps-themes repo https://github.com/protomaps/protomaps-themes I had intended as a place for user-contributed styles as well as additional layers that can be composed with the default style. I just added a commit that visualizes an additional layer on top of the default: https://github.com/protomaps/protomaps-themes/commit/f86759fc2ef97f5573ceba90a3400936ba1e01c9

I prefer 2) in the long term because making it easy to compose layers is enabled by JavaScript and lets the default style be smaller and easier to maintain, but we need to think about evolving the internal APIs ( those provided directly by the protomaps library ) to make this clean code-wise. Thoughts on one of the two approaches above?

bdon avatar Jul 24 '22 03:07 bdon