Traewelling / line-colors

This repository collects German public transport line colors.
https://traewelling.github.io/line-colors/
Creative Commons Zero v1.0 Universal
29 stars 41 forks source link

Why yet another database? #91

Open dreua opened 6 months ago

dreua commented 6 months ago

Couldn't this data be added to an already existing database (OpenStreetMap, Wikidata) and be scraped and aggregated from there if the use-case needs it? On the other hand your approach is probably easier if you want to get started fast and it seems to work well for instance in endoflife.date, so whatever. Maybe someone will write tools to synchronize data between those databases, maybe someone wont, we'll see :thinking:

Some examples of already present data

37% of the world's route=train in OSM already have a "colour" tag according to taginfo Example in Wikidata with icon and "sRGB color hex triplet": https://www.wikidata.org/wiki/Q96388302 Now on OSM the same line has a different color set unfortunately: https://www.openstreetmap.org/relation/2552686

vainamov commented 6 months ago

I think you've captured most of the rationale behind creating a custom database in your question already.

Most data sources list a single color value, which is sufficient for distinguishable presentation, but not as close to the actual signage for example used in the real world (thus not as recognizable). This database stores three colors and the shape, which enable apps to display the line icons more accurately. (Most of the colors in https://taginfo.openstreetmap.org/keys/colour#values e.g. are simply names like "brown" or "orange", whereas we would like the values to be more precise)

Another issue are the discrepancies across different sources. This is a problem even found in official materials (sometimes these are vastly different due to e.g. separate maps from the operator of a line and the network it belongs to). We can try to collect the colors for lines within a network from the same source to achieve a coherent look, but when scraping from the different public sources, there is plainly no guarantee for that.

And lastly, a custom mapping allows us to easily prepare the data to be used in conjunction with the trip data from Traewelling.

jheubuch commented 5 months ago

Closing because of missing response

dreua commented 5 months ago

Do you have all the data you need? Using your DB format and its identifiers I am unable to see whether there is data missing in my area which I'd be able to provide. Furthermore we could consider adding links to the openstreetmap wiki page so that people looking for this data could find you database.

MrKrisKrisu commented 3 days ago

I would like to reopen the topic, as in my opinion some problems have arisen in the past that the current CSV cannot map well, such as the sometimes very complex shapes.

Wikidata might actually be a good source. Colours are already stored there for many traffic lines. Corresponding icons are also available as SVG, which would make generating your own obsolete and solve the problem with the complex shapes.

For the link with e.g. HAFAS Trips, a property might have to be applied for at Wikidata.

I have created an automatic list of transport lines in Germany, which shows the current status. Maybe you can already start with the data maintenance there: https://www.wikidata.org/wiki/User:Mkkagain/Verkehrslinien_in_Deutschland

What is your opinion on this?

(Especially @jheubuch, @vainamov, @marhei as you are using the colours in your apps)

Screenshot 2024-09-02 at 12 26 12
jheubuch commented 1 day ago

I generally would be fine by that, but anyhow (from a Träwelldroid perspective) I wouldn't like to query Wikidata dataset for every check-in or for every connection on the departure board. The most convenient way would be to anyhow implement that into that Träwelling API that: