I am searching metro and tram routes and stops, example Bilbao.
With overpass turbo wizard on https://overpass-turbo.eu , I use
type=route and route=tram or type=route and route=subway
to create
/*
This has been generated by the overpass-turbo wizard.
The original search was:
“type=route and route=tram or type=route and route=subway”
*/
[out:json][timeout:25];
// gather results
(
// query part for: “type=route and route=tram”
node["type"="route"]["route"="tram"]({{bbox}});
way["type"="route"]["route"="tram"]({{bbox}});
relation["type"="route"]["route"="tram"]({{bbox}});
// query part for: “type=route and route=subway”
node["type"="route"]["route"="subway"]({{bbox}});
way["type"="route"]["route"="subway"]({{bbox}});
relation["type"="route"]["route"="subway"]({{bbox}});
);
// print results
out meta;
>;
out skel qt;
(I changed to "out meta" to get maximum results)
The example is from Bilbao.
I export to geojson, which gives me almost what I need except on thing:
this is how a tram stop looks like:
{
"type": "Feature",
"properties": {
"@id": "node/5478168779",
"@relations": [
{
"role": "stop",
"rel": 8753521,
"reltags": {
"colour": "green",
"from": "Bolueta",
"name": "T1 (Bolueta → La Casilla)",
"network": "Euskotren Tranbia",
"network:wikidata": "Q123955",
"network:wikipedia": "eu:Euskotren Tranbia",
"operator": "Euskotren",
"operator:wikidata": "Q3061020",
"operator:wikipedia": "eu:Eusko Trenbideak",
"public_transport:version": "2",
"ref": "T1",
"route": "tram",
"to": "La Casilla",
"type": "route",
"wheelchair": "yes",
"wikidata": "Q2661356",
"wikipedia": "en:Bilbao tram"
}
}
]
},
"geometry": {
"type": "Point",
"coordinates": [
-2.9287285,
43.2663144
]
},
"id": "node/5478168779"
},
This is how the stop looks in OpenStreetMap:
(original data source: https://www.openstreetmap.org/node/5478168779 )
OSM has tags, especially the name, that are missing in the geojson export.
How do I get the tags like
name: "Uribitarte"
network: "Euskotren Tranbia"
operator: "Eusko Trenbideak"
Into the geojson export?
asked
21 Jun '22, 20:02
Gerd_c
9●1●1●2
accept rate:
0%