Automated incremental Bus Stop (GTFS) updates

On further thought, I think there’s a way that already works: Manually add different name tag such as alt_name whenever a ground name differs from the MOT name. This doesn’t require 2 name tags per stop and doesn’t require any script changes because the script would ignore alt_name or similar tags.

Adding the on-the-ground name in the “name” tag and the MOT in another does complicate things.

Would adding something like this to the Wiki be sufficient?


If the on the ground name is not the same as the MOT name, please:
1. add it to alt_name.
2. Optionally add a note that mentions this difference.
3. Optionally report the problem to MOT.


Good approach!
I’d like to suggest adding the appropriate email or web address to number 3 above.

The on-the-ground notes have been added to the Wiki.

From now on, updates will usually run at Saturday evenings.

Most bus stops have an “addr:street” and an “addr:number” now. This covers most of Israel. I wonder how this affects navigation apps such as Osmand. Does it improve the search?

What would be the suitable OSM equiavlan of “רציף”? E.g.


55137,ת. רכבת כרמיאל/רציפים, רחוב:  עיר: כרמיאל רציף: 2   קומה:  ,32.923817,35.298353
55137,ת. רכבת כרמיאל/רציפים, רחוב:  עיר: כרמיאל רציף: 3   קומה:  ,32.923817,35.298353
55137,ת. רכבת כרמיאל/רציפים, רחוב:  עיר: כרמיאל רציף: 4   קומה:  ,32.923817,35.298353
55137,ת. רכבת כרמיאל/רציפים, רחוב:  עיר: כרמיאל רציף: 5   קומה:  ,32.923817,35.298353
63111,מסוף אורנית, רחוב:  עיר: שומרון רציף: 1   קומה:  ,32.107438,34.999197

I have made a stupid mistake. I added “addr:number”, which is a nonexistent tag.

But what should be used instead? “addr:housenumber” doesn’t seem right either.

https://wiki.openstreetmap.org/wiki/Key:addr

addr:number changed to addr:housenumber in https://www.openstreetmap.org/changeset/59727988

Osmose now jumps on "suspicious tag combination
highway together with addr:* "

I don’t think the address should be saved in the bus stop node in OSM. This might cause duplicate addresses when there’s already an address node (or tag) on a nearby building.

I apologize for the problematic tagging. I am not very familiar with address tagging and should have studied this further first.

What do you propose? It is possible to revert this and put “addr:housenumber” and “addr:street” in the description tag. But I would have preferred something which allows the clients like Osmand to use the addresses even in areas where no one has tagged the houses. That would be much better for usability.

Is it OK to keep “addr:street” and put the housenumber in the description?

Isn’t Osmose wrong here? (Assuming we keep addr:street only)

Since address duplication is dangerous and may cause unknown behavior in client address lookup, I have decided to move addr:housenumber to gtfs:addr:housenumber in the meantime, even before the discussion is finished. Please feel free to post your opinions on what should be done with addr:housenumber and addr:street.

Changesets: #60009323, #60010547

I’m investigating ways to increase the “bus factor”. Currently, when fetching new MOT GTFS files, the script needs to compare them with the files fetched the previous run. This means that if I lose both my PC and my PC backup, or if I ever get hit by a bus, running the script properly would be a bit fiddly, because one would have to reconstruct the lost file.

I would like to make the script completely stateless locally. This should be technically possible: Fetch latest bus stop changeset by SafwatHalaby_bot, and use that as the “old gtfs file”. This would make the script solely dependent on OSM servers, and not on any local hard drive.

This might be a major overwrite, so while we’re at it, I would like to rewrite the script such that it does not depend on JOSM. This should make running it headless natural and pave the way for complete automation.

Replying to an old point:

According to https://wiki.openstreetmap.org/wiki/Tag:public_transport%3Dplatform , ref= should be used for that. I’m not sure whether that tag is supposed to go on the highway=bus_stop node or on something else.

Glad to hear of the planned bus factor improvements.

There is a semantics issue here. The thing called “platform” in the Wiki is essentially a bus stop, we already use the “ref” tag for bus stop numbers.

The thing called a “ratzeef/platform” in the MOT GTFS is better translated into a “terminal number”, available only for some bus stops, mainly in central bus stations. So far I couldn’t find a Wiki entry which discusses it.

I don’t think you can call it “terminal number”, the רציף/platform in the GTFS is a platform just like a train station platform.

A bus terminal is what we call מסוף אוטובוסים in Hebrew. The Tel Aviv Central Bus Station or Arlosoroff Terminal are bus terminals. They don’t have numbers.

The “platform” in the GTFS file is there so that transit navigation apps will point users to the right platform for their bus. The GTFS file does not have the accurate coordinates for each platforms, so it uses the same coordinates for all and the same name for all, for example “Tel Aviv Central Bus Station 7th Floor/Platforms” ( https://www.openstreetmap.org/node/1803094757 ) is one node in OSM and one stop_code in the GTFS, but it has many lines in stops.txt with different stop_id for each, and the difference is just the stop_id and the platform number.

Considering this, I don’t see how keeping the “platform number” is useful to OSM in any way, and I suggest you ignore this in your automated imports, and only have one OSM node per GTFS stop_code.

Agreed. The “platform number” is currently ignored.


The deletion of stops is slowly making the OSM dataset deviate from the MOT dataset. I propose preventing users from deleting stops. Non existing stops would have to be reported upstream to MOT, just like renaming. Comments?

As a reminder, here are the current conflict handling rules: https://wiki.openstreetmap.org/wiki/User:SafwatHalaby/scripts/gtfs#Information_for_mappers

I am essentially proposing replacing “You may delete a bus stop” with “you may not delete a bus stop directly. Contact MOT instead”.

I just completed a bus stop update in #64848970.

This is a normal update, except that it’s bigger than usual, because the last update was 4 months ago.

Click here to see the full history, or here for more info regarding bus stop updates.

“Contact MOT” is not enough - the exact web address/email should be added, otherwise this will be useless…

@SafwatHalaby Great job You do! Thank you :slight_smile:
I believe the last changes are good improvements, relaying on MOT/GFTS data is more clever, although it has its own mistakes.

What about adding the bus numbers (Mispar Ha Kav) as a new tag to each bus stop?

It will give useful information for passengers and trip planners
The data is available as route_short_name in routes.txt in GFTS database.