-
Notifications
You must be signed in to change notification settings - Fork 131
Home
GeoNames MysQL DataImport is a Linux Bash Script to download geographical data from geonames site and lod them into a MySQL database in order for you to include that information in your own projects.
Note to old users ... This wiki is the main and unique point of documentation related to this project. The last documentation will be here. So, if you use to look at the webpage where we hold old documentation, please remove that link because it will disappear soon.
The contents of this project are a compendium of different knowledge adquired about GeoNames geographical database. Most of this knowledge was obtained from the GeoNames Forum - Importing all geonames tables to MySQL.
The current version (V 2.0) has been completely rewritten to be more user friendly and including most of the pull requests sent by other contributors.
Please, feel free to collaborate in the project if you consider it.
As for this new version of Geonames MySQL Data Importer several configuration parameters has been included at the begining of the script.
You can chage this at your own convenience to match your environment.
The parameters included are:
# Default values for database variables.
dbhost="localhost"
dbport=3306
dbname="geonames"
dbusername="root"
dbpassword="root"
# Default general dumps to download
dumps="allCountries.zip alternateNames.zip hierarchy.zip admin1CodesASCII.txt admin2Codes.txt featureCodes_en.txt timeZones.txt countryInfo.txt"
# Postal Code information.
# You can specify a set of the files located at http://download.geonames.org/export/zip/
postal_codes="allCountries.zip"
The original philosophy of the project has not been changed in this new version. So, two operation modes are provided. These are:
- Downloading Geonames data sets
- Importing the data into a MySQL database