Skip to content

nathanrawle/geonames-postgres

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

geonames-postgres

Scripts to initialise schemas and load data from genomes.org gazetteer data into a postgres database

Pre-requisites

  • psql (only tested on version 14.9)
  • geonames gazetteer files (see #Installation for details)

Installation

  1. Download the following gazetteer files from geonames to the repository root
    • allCountries.zip
    • alternateNamesV2.txt
    • timeZones.txt
    • iso-languagecodes.txt
    • hierarchy.zip
    • userTags.txt
  2. Extract the .zip files and move extracted files from any subfolders into the repository root
  3. Log in to psql and add the user "geonames" to your postgres cluster:
CREATE USER geonames;
  1. Run the following commands:
# create database and define schemas
psql -f init.sql

# load gazetteer data into `geonames` schemas
./populate_database.sh

About

Shell scripts to initialise schemas and load data from genomes.org gazetteer data into a postgres database

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages