This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

english city name in overpass turbo request

0

hi all, i have a list of city names in english, i want to export road lengths. using the below syntax, but it doesn't give results for cities like Copenhagen since it's different than the local name. any advices here? i tried name:en, but didn't work.

"Dedicated cycle lanes": """
[out:json];
area[name='{city}']->.a;
way[highway=cycleway][bicycle=designated](area.a);
(._;>;);
out geom;
""",

asked 27 Apr '23, 14:03

ozlem_'s gravatar image

ozlem_
11112
accept rate: 0%

edited 27 Apr '23, 14:25

Spiekerooger's gravatar image

Spiekerooger
3.1k22356


2 Answers:

0

You can try name:en For larger cities this should always be populated, int_name could work too.

answered 27 Apr '23, 14:16

SimonPoole's gravatar image

SimonPoole ♦
44.7k13326701
accept rate: 18%

0

You would need to use 'name:en' not name:en for hstore tags.

Example:

[out:json];
area['name:en'='Rome']->.a;
way[highway=cycleway][bicycle=designated](area.a);
(._;>;);
out geom;

Though for Copenhagen, it does not seem to have any bicycle=designated cycleways. Maybe they use different tagging in Copenhagen?

But the above overpass turbo code works for e.g. Rome, Berlin or Munich (Munich example: http://overpass-turbo.eu/s/1uiK ).

answered 27 Apr '23, 14:22

Spiekerooger's gravatar image

Spiekerooger
3.1k22356
accept rate: 16%

edited 27 Apr '23, 15:13

Source code available on GitHub .