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

Hi can I can get the cites with geographic locations and populations.

This question is marked "community wiki".

asked 31 Jan '20, 19:58

Ramzan243's gravatar image

accept rate: 0%


It's quite easy to find cities of a limited area, with this request on overpass-turbo (build in one click using the wizard).

But for the whole world it's really hard on the server and browser, Overpass is not meant for worldwide requests. The result will be hard to parse, as most cities are nodes, but some are relations, hence to get the coordinates, you'll have to compute form the relation members. Also in OSM the population tag is not really reliable, mostly used for rendering and search results ordering.

You should probably use wikidata, either through the wikidata tag, or directly using theirs tools (SPARQL query service).

From an example and removing the 100 limit, I got 23128 cities, with population, using that request. Beware, it takes some time to compute, and some more to render.

Hope this helps.

permanent link

answered 05 Feb '20, 12:17

H_mlet's gravatar image

accept rate: 13%

Your answer
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: 31 Jan '20, 19:58

question was seen: 1,601 times

last updated: 05 Feb '20, 12:17

powered by OSQA