Joined: 11/06/2016 13:32:08
I had to use geonames database with sqlite, so I did a small bash script to do that.
Actually, it only use 3 tables: geonames, countryinfo and zipcodes (countryinfo is filled only if the user choose to load allCountries).
The script allows:
- to choose the country to import,
- to choose to use the postal codes file or not,
- to reduce the geonames table to have only the cities (fclass P)
When the base already exists, the user can overwrite it or append, to add countries.
If the files are already downloaded, the script allows to overwrite or use the existing one.
TODO: in append mode, forbid to reinject an already loaded country.
Possible evolutions: load all the tables (alternateNames, iso-languages, ...)
Feel free to use, modify, comment or suggest. The source is on gitlab: https://gitlab.com/anobash/geoloader