Geo Spatial – free city to country geo data
- Saturday Dec 27,2008 04:45 PM
- By naz
- In Database
After the release of the US Cities Zip Codes some time ago, PHPRO.ORG has been inundated with requests for a world cities database with all the geo data included. This means Latitude and Longitude data, time zones etc.
PHPRO.ORG answers these request by providing the follow MySQL database of cities and location with 6,670,778 records. Yes thats not a typo, over six and a half million records provided freely by PHPRO.ORG.
Some data, such as elevation etc may be missing from some records. This database may be mildly or wildly inacurate and is provided AS IS with no warranty of fitness for a purpos.
Database Schema:
- city_id - integer id of record in geonames database
- city_name - name of geographical point (utf8)
- asciiname - name of geographical point in plain ascii characters
- alternatenames - alternatenames, comma separated
- latitude - latitude in decimal degrees (wgs84)
- longitude - longitude in decimal degrees (wgs84)
- feature class - see http://www.geonames.org/export/codes.html
- feature code – see http://www.geonames.org/export/codes.html
- country code - ISO-3166 2-letter country code, 2 characters
- cc2 - alternate country codes, comma separated, ISO-3166 2-letter country code, 60 characters
- admin1 code - fipscode (subject to change to iso code), isocode for the us and ch, see file admin1Codes.txt for display names of this code
- admin2 code - code for the second administrative division, a county in the US, see file admin2Codes.txt
- admin3 code - code for third level administrative division
- admin4 code - code for fourth level administrative division
- population - The population calculated at modification_date
- elevation - in meters
- gtopo30 - average elevation of 30′x30′ (ca 900mx900m) area in meters
- timezone - the timezone id
- modification date - date of last modification in yyyy-MM-dd format
Links:
dump, geo, MySQL, phpro.org
Leave a reply
You must be logged in to post a comment.