Hello, I was unsucessfull to get a tabular data of all bus lines in London (get master relationship number)?
[out:json];
relation[“route_master”=“bus”][network=“London buses”];
(rel(r)({{bbox}});>;);
// print results
out geom;
Hello, I was unsucessfull to get a tabular data of all bus lines in London (get master relationship number)?
[out:json];
relation[“route_master”=“bus”][network=“London buses”];
(rel(r)({{bbox}});>;);
// print results
out geom;
What do you mean by “unsuccessful”? For example did the query not return any data, or it was not in the right format?
If you really only want a list of names and numbers, something like this:
[out:csv(ref, name)];
relation["route_master"="bus"]["network"="London Buses"];
out;
You would need to look at the “Data” tab to see the output, as this format does not return geographic data for display on the “Map” tab.
That’s almost what I need: how to get also the master relationship number ?
Do you mean the OSM object ID? That is the special field “::id”.
[out:csv(::id, ref, name)];
relation["route_master"="bus"]["network"="London Buses"];
out;
See “CSV output mode” here, or this tutorial.
Thanks, perfect!
Now, is there a way to upload (other than type in manually) these wikidata number https://w.wiki/DCxp to their relationships (master relation+relations) ?
Adding the wikidata links to all London Buses route master relations would be considered a Automated edit and would probably require individual review. Judging from your Wikidata Query it looks like all WD entries of active bus routes already have their OSM id link present, so the one-way link is already present. You might want to look at creating a Maproulette Task with that information to have contributors review those links to OSM relations are still current and then add the WD link on the OSM object.
Thanks, I have posted a request on maproulette ; not sure it’ll work . The idea is to get that map of London buses working Utilisateur:Bouzinac/Brouillon — Wikipédia (note that there are bizarres dots)
The maproulette task :
MapRoulette
I’m not sure I understand the references to child relations. Are you saying you want to add the same wikidata id to 3 objects in the case of a typical route master with two directions?
Yes, because this wikipedia template works with child relationships only Template:Rapid transit OSM map - Wikipedia