Skip to content

Latest commit

 

History

History
29 lines (26 loc) · 981 Bytes

README.md

File metadata and controls

29 lines (26 loc) · 981 Bytes

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