NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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
112
accept rate: 0%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×107
×17

question asked: 28 Dec '23, 18:38

question was seen: 153 times

last updated: 28 Dec '23, 18:38

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum