Loading the GeoNames
Explore how to import the extensive GeoNames geographical dataset into PostgreSQL. Understand the challenges with raw data, apply normalization rules, and use tools like pgloader for efficient loading. Gain practical skills for managing complex location data in a relational database.
We'll cover the following...
Note: The GeoNames geographical database covers all countries and contains over eleven million place names that are available for download free of charge.
The website offers online querying, and all the data is made available to download and use. As is often the case, it comes in an ad hoc format and requires some processing and normalization before it’s usable in a PostgreSQL database.
GeoNames: Loading the raw data
We’ll load the data by using the following script/code:
Once we’ve loaded the raw data from the published files at http://download.geonames.org/export/dump/, we ...