Open mfrieling opened 8 months ago
Two more examples from Klagenfurt data which could lead to non-matching problems using the name:
Here the name contains a non-breaking space. If that is the case for the the railway station data but not for the stop position of a railway line relation, it probably would not match.
Especially the southern part of Carinthia has two official languages, German and Slowenian. For some people it is very important to have the name in both languages there, while others will follow the OTG rule, which for that station acutally would be "St. Michael ob Bleiburg Bahnhof" according to ÖBB Scotty. (here the bilingual name applies only for the village/city but not for the train station. This could lead to breaking the transit layer in case of data changes on OSM if the station would be within one of our areas. But if a correct UIC reference gets mapped to the stations and route relation stops the risk that someone changes that is less than a name change, especially as there are no defined rules for bilingual names in Austria: https://wiki.openstreetmap.org/wiki/Multilingual_names.
I think using the uic_ref is a good idea! Do you have time to implement the changes? I would even go for using uic_ref as the first way to match stations and only then fall back to names. And before comparing the names strip all whitespace and make a case-insensitive comparison.
I can implement these changes, maybe in March. First I want to complete other development changes (I've sent you an email) and not mix them up. Furthermore I also have to update the Klagenfurt data. In addition, I've just asked Willi if he can ask his contacts at ÖBB for an official list of UIC refs for all Austrian railway stations including permissions to use the data on OSM. If we can get it, we can update OSM with the missing UIC refs later.
When displaying the public transit layer for Klagenfurt, I've observed that Klagenfurt Ostbahnhof" is shown using the trainstation icon instead of the sbahn icon and doesn't list the S1 which stops there. When looking into the overpass data files I found that in the railway stations file the name is "Klagenfurt Ostbahnhof" while in the railway lines it is "Klagenfurt Ostbf"_. I looked up the correct name by the UIC reference and corrected it on OSM already. But can we guarantee that similar issues don't exist for other relevant stations?
On the other hand, many stations and relation stop positions don't have the UIC reference, so mapping based on it instead of the name doesn't work. But would it make sense to add mapping via UIC reference as fallback if mapping via name is not possible? That is if this
if
evaluates tofalse
:https://github.com/markusstraub/radlkarte/blob/eabe283f7bdceefc500add6451c16fec194fbb75/radlkarte.js#L367-L375
It is not a quick & easy fix which could be implemented in a few minutes, so I like to discuss this here.
Required tasks:
railwayLines
overpass query by writing theuic_ref
into the result data.loadStationName2Line2Colour()
to return objects containing all information (name, ref, colour and uic_ref) keyed by array index and update the lookup accordinglyloadStationName2Line2Colour()
to return the same data structure as now but keyed by uic_ref instead of by name.