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

query with region

0

I have the following code: with only city name it works good. ("Кировск") But when I try to do it with region, i get zero

import overpy
city_name = "Кировск, Мурманская область"

api = overpy.Overpass()
query = f"""
    area["name"="{city_name}"];
    node(area)["tourism"];
    out;
"""

result = api.query(query)
poi_count = len(result.nodes)

print(f"{city_name}: {poi_count}")

asked 28 Dec '23, 18:38

dthedog's gravatar image

dthedog
11112
accept rate: 0%

Source code available on GitHub .