Why not ask your question on the new OpenStreetMap Community Forum?

I'm trying to run an Overpass turbo query of OpenStreetMaps Cities that will return the cities as CSV data with several fields (columns).

I'm currently able to get these fields:

Latitude, Longitude, Name, Population (plus any other simple tags of the nodes)

By running this query:

// fetch area to search in
{{geocodeArea:united states}}->.searchArea;
// gather results
  node[place="city"](area.searchArea)(if:count_tags() > 0);
// print results
out body;
out skel qt;

But, I would like to also get these fields, and I have been unable to do so:

  1. Total number of tags associated with the node
  2. Name of the Country in which the node is located
  3. Name of the State in which the node is located

I know that data is there, because I can use both the country and tag count to filter the data, but I can't seem to get those as data in my CSV output.

Any help would be greatly appreciated!

asked 06 Jun '22, 22:35

salb1845's gravatar image

accept rate: 0%

Be the first one to answer this question!
toggle preview

Follow this question

By Email:

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



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:


question asked: 06 Jun '22, 22:35

question was seen: 850 times

last updated: 06 Jun '22, 22:35

powered by OSQA