0

I'm sure this question will be closed, but to be frank I'm not sure anywhere else I could ask it.

I need a database/list of every city in the world (not just capitals) with the data to include the name of the city, lattitude, longitude and timezone.

Where might I be able to find such data?

dlofrodloh
  • 1,728
  • 3
  • 23
  • 44

3 Answers3

3

Try this one. It says it has all cities in the world, lattitude, longitude. https://www.maxmind.com/en/free-world-cities-database (free, granted it's no longer maintained, good start though)

Christopher Stevens
  • 1,214
  • 17
  • 32
  • You may need to look elsewhere to mix in the timezone. I'm digging a bit deeper. – Christopher Stevens Jan 15 '16 at 03:17
  • 1
    Geonames is another option: http://www.geonames.org/export/web-services.html#timezone . Also, see this post for how to convert lat/lon into a timezone: http://stackoverflow.com/questions/16086962/how-to-get-a-time-zone-from-a-location-using-latitude-and-longitude-coordinates This last link gives many more options to look into. – Christopher Stevens Jan 15 '16 at 03:19
  • ad Geonames: recently I found out that the coordinates are not the center of the city, they are the position where the name of the city can be positioned in a map. They are often outside of the village / city. – AlexWien Jan 20 '16 at 19:22
  • I used Geonames, their data is good and works perfectly with my application – dlofrodloh Jan 25 '16 at 22:35
  • end of 2019 - looks like maxmind db is no longer available – FlyingZebra1 Nov 05 '19 at 21:08
0

Use this file in your android project's res/values directory https://drive.google.com/open?id=1PKKNGi9IbYshcjvhM9UucpTw86RdxKff

Then get it in your Activity class like

          String s[]=getResources().getStringArray(R.array.popular_cites);
Sumit Garai
  • 1,205
  • 8
  • 6
0

Checkout https://citiesdatabase.github.io/ if it helps. I found it low cost and has enough sample records to verify authencity.

Ganesh S
  • 371
  • 6
  • 26