GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Import geonames dump in sqlite  XML
Forum Index -> FAQ - frequently asked questions
Author Message


Joined: 11/06/2016 13:32:08
Messages: 3

Hello there,

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 github:
Forum Index -> FAQ - frequently asked questions
Go to:   
Powered by JForum 2.1.5 © JForum Team