geon
v0.1.1
Published
Geonames data collector
Downloads
6
Maintainers
Readme
Collect and filter data from geonames.org and store it in JSON
$ git clone git://github.com/molforp/geon
$ cd geon
$ npm install
Commands
geon fetch [countries...]
– download files from geonames.orgparam
countries
: optional (list of country codes:RU UA US
, if not exists - fromconfig.js
)options:
--alt
- downloadalternateNames.zip
,--ci
- downloadcountryInfo.txt
,--c1
- downloadcities1000.zip
,--c5
- downloadcities5000.zip
,--c15
- downloadcities15000.zip
geon alter [langs...]
– filter alternateNames by languageparam
langs
: optional (list of languages:ru en
, if not exists - fromconfig.js
)geon build [countries...]
– build cities and regions for full countriesparam
countries
: optional (list of country codes:RU UA US
, if not exists - fromconfig.js
, orall
- build all countries)options:
--co
- build countries fromcountriesInfo.txt
,--ci
- build cities for countries from configgeon cities [countries...]
– build cities from the file cities1000.txt or cities5000.txt or cities15000.txtparam
countries
: optional (list of country codes:RU UA US
, if not exists - build for all countries)geon regions [countries...]
– build regions from the file cities1000.txt or cities5000.txt or cities15000.txtparam
countries
: optional (list of country codes:RU UA US
, if not exists - build for all countries)geon fix [countries...]
– add some fixes for dataparam
countries
: optional (list of country codes:RU UA US
, if not exists - add fixes for countries from directoryfixes/countries
)geon -h
– show help for geon
All raw data stores in raw_data
folder and destination data stores in data
folder. You can change it in config.js
.
geon -h
for more info.
Steps
geon fetch --alt --ci --c1
- downloadalternateNames.zip
,countriesInfo.txt
,cities1000.zip
geon alter
- filter alternate namesgeon cities
and thengeon regions
, or justgeon build
- build cities and regions with translations fromalternateNames
geon fix
- add some fixes