Geographical location (latitude, longitude, altitude) of all main cities of the world. The data has been scrapped from [Aneki World Cities site] (http://www.aneki.com/cities.html)
The repository contains the location database in below formats:
- SQL
- CSV
- CSV for MS EXCEL, MS EXCEL 2000
All of them are exported from MySQL using phpMyAdmin.
The table has in 10,567 rows (means 10,567 unique cities, their locations and 170 countries).
The table has 5 fields, id
, country
, city
, latitude
, longitude
, altitude
. From their name, I hope you can understand their significance.
The sql file contains the schema to reproduce the location table in your designated database (assuming you are using mysql database engine. If you aren’t, you can easily convert the sql schema
SELECT DISTINCT(country) FROM location
SELECT city FROM location WHERE country = 'YOUR_COUNTRY_NAME_HERE'
SELECT latitude,longitude,altitude FROM location WHERE country='COUNTRY_NAME' AND city = 'CITY_NAME'