I am looking for a free dataset of world cities. I checked all the datasets suggested in the question: Seeking Country/State/City Database?, but couldn't find one where the city location is available as a polygon (or similar), I found only latitude/longitude.

Actually, I don't even need a very precise polygon, the end use is just to compute if a given point is in a city or not.

  • 2
    What qualifies as a city by your definition?
    – underdark
    Feb 14, 2012 at 10:17
  • uuuh ... tough one. I have no idea actually. I am building a website where users can place a point somewhere on a map, and then all points should be searchable by city. So I guess cities of more than 500-1000 inhabitants would make sense !? But that's really not my field, ... so any hint/insight is welcome.
    – sebpiq
    Feb 14, 2012 at 10:21

3 Answers 3


If you're really talking about cities down to 500-1000 inhabitants, you can't even get that data if you pay for it. Even the locations of cities with 1000 people are something that's hard to pay for -- there's a lot of cities of that size in the world.

Commercial providers like NAVTEQ don't tend to have polygons for anything that small, for example, because it can't be collected via on-the-ground data.

If you limited yourself to looking for rough outlines of cities of 1 million people or more, VMap0 might have the data you're looking for -- but it's very coarse.

If you don't care about 'free as in freedom' but instead only free as in "I don't have to pay for it", you might try Reverse Geocoding; use a reverse geocoder to look up a location, and then look at the city field. This is probably your best bet -- but ties you to someone who has a good geocoder that they make available (Google) and all that that entails.

  • Hey ! Thanks for the answer ! I had already checked at google's APIs, and I had only found the "places" API, which was not what I wanted. But this geocoding API looks very promising (I guess I'll go with that) !!! And yeah ... by "free" I indeed mean that I can't pay for it.
    – sebpiq
    Feb 14, 2012 at 12:39

Geonames WebServices may be a fit (http://www.geonames.org/export/web-services.html). You can search by lat lon, or download the entire data set to slice and dice it how you need.


Here you can download a shapefile with polygons for about 6,000 world cities: https://geo.nyu.edu/catalog/stanford-yk247bg4748

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.