[OSM-talk] Automated Edit - Bus stops status link & Bus lines timetable link (Tenerife)

Sören Reinecke valinora at gmx.net
Fri Mar 24 19:33:22 UTC 2023


> What do you think about this idea? What would be the best way to achieve this in an automated way?

If these urls are following a fixed scheme like you mentioned then I see no need to add the urls. There is no need to store them if you can create them from a combination of the hard coded
> " https[https://titsa.com/ajax/xGetInfoParada.php?id_parada=4004]://titsa.com/ajax/xGetInfoParada.php?id_[https://titsa.com/ajax/xGetInfoParada.php?id_parada=4004]parada[https://titsa.com/ajax/xGetInfoParada.php?id_parada=4004]=[https://titsa.com/ajax/xGetInfoParada.php?id_parada=4004]
" and a variable part retrieved by reading the value of the "ref" osm key


> I know the Overpass API and I could probably readily identify all the relevant bus stop nodes and bus line relations.  However, I have never updated such things in an automated way.

It requires knowledge how databases work in general, why normalization & abstraction is important and at last you need to be developer. There is a way with JOSM, saving as JOSM session file, adding the website key using python3, opening JOSM session file and uploading to OSM. But I think no reliable method. For me personally it would be easier to use the OSM Editing API (not the same as Overpass) to create new changesets assigned to node/way/relation id containing all previous tags + the one to add.

If you're not a developer, just a mapper who can do editing and using Overpass, then do not touch that topic without guidance. There is no official guidance or template to do this which is actually a good thing as it an obstacle to not make it too easy for "children" (in double quotes for reasons) and protects us from edit spaming. This is the reason why I currently abstain from writing a python3 script to make it easier to write editing bots.

Mar 24, 2023 13:49:25 facebook_140f8d4e-9d8f-4d51-a5a7-320f53afc591 at vollbio.de:

> Hi there
> 
> I would like to update all bus stops on the island of Tenerife with a link to the status website of upcoming connections to this bus stop:
> 
* > An example of bus stop: https://www.openstreetmap.org/node/1147359056
* > Each such bus stop inhibits a reference: ref=4004
* > This reference can be used to obtain that bus stops upcoming connections: http://movil.titsa.com/infoparada.php?IdParada=4004
* > Actually, in reality each bus stop has a QR code to check this status, which leads to the latter website.
* > Hence, all these QR codes are spread across the island, I assume the link will seldomly change.
* > There is also an Ajax link: https://titsa.com/ajax/xGetInfoParada.php?id_parada=4004 (But thats directly from the website and probably not that stable as the former one).
> 
> I think, this link would be good to have with each bus stop for Tenerife on OSM, so one can easily derive the upcoming departure times, even when not being nearby the bus stop.
> 
> 
> 
> Furthermore each bus line on the island has a timetable available online, that I would like to link for each bus line:
> 
* > An example bus line: https://www.openstreetmap.org/relation/7165110
* > Each such bis line inhibits a reference code: ref=419
* > This reference can be used to obtain that bus lines timestable and overview website: https://titsa.com/index.php/tus-guaguas/lineas-y-horarios/linea-419
* > An alternative link is this: https://movil.titsa.com/infolinea.php?IdLinea=021 (But I guess, it is less useful and does not immediately display the general times.)
> 
> Also these links would be good to have with each bus line.
> 
> 
> 
> What do you think about this idea? What would be the best way to achieve this in an automated way?
> 
> I know the Overpass API and I could probably readily identify all the relevant bus stop nodes and bus line relations.  However, I have never updated such things in an automated way.
> 
> Many thanks
> 
> Klaus
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk/attachments/20230324/98a69d8c/attachment.htm>


More information about the talk mailing list