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

Hi OSM-community! I am new to the subject, so I ask for a hint. I've found this awesome script: https://gist.github.com/4gus71n/26589a508d8deca333bb05928fd4beb0 which I try to modify. Line I am working on is:

data = api.get('area('+str(id)+')->.a;(way(area.a)["name"]["highway"]["highway" !~ "path"]..blahblah..["highway" !~ "cycleway"]["foot" !~ "no"]["access" !~ "private"]["access" !~ "no"];node(w)(area.a););out;')

I try to make it get cities when given id of country. What I have for now is:

data = api.get('area('+str(id)+')->.a;(node(area.a)["name"]["place"="city"];node(w)(area.a););out;')

As you probably figured out - it does not work. I've tried many things and I'm unable to make it work. Could I ask for any hints? I also have tried to go with OverpassTurbo, but any query I fed was giving empty results.

Thanks!

asked 16 Jun '21, 13:26

siemaeniownik's gravatar image

siemaeniownik
26223
accept rate: 0%

edited 16 Jun '21, 13:27

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:

×228
×85
×26

question asked: 16 Jun '21, 13:26

question was seen: 1,191 times

last updated: 16 Jun '21, 13:27

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