Importing Natural Earth Data geopackage into PostGIS


Tutorial Videos #

This covers the steps outlined below for those inclined to video.

Natural Earth Data #

The Natural Earth datasets are an incredible resource. If you’re a cartographer you probably already know about it, and if not, you should definitely check it out. It’s a project spearheaded by some fantastic folks affiliated with NACIS. NACIS is a great organization that does so much for the cartographic community–check them out! I use Natural Earth Data a lot so it made sense for me to get all of the data into a format where I could import/crop any dataset into my Illustrator/MAPublisher document without having to even touch a GIS.

1. Install Prerequisites #

1a. Install QGIS (3.28 or better, in order to get GDAL/OGR 3.3 or better, which has the needed geopackage (.gpkg) driver)

1b. Install Postgres.app

  • Download the full NaturalEarthData geopackage (.gpkg)

Download and run the import script #

Download ne-gpkg2postgis.sh
ogr2ogr -progress -f "FileGDB" -sql "SELECT * FROM cn_osm_secondary" cn_secondary_rds.gdb PG:"host=localhost user=jrobertson dbname=osm_chinyc"

Markdown content
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa

Title

Markdown content #

Lorem markdownum insigne…

Explain
  • ogr2ogr #calling the ogr library

  • -progress #show a progress bar

Explain this Command
- ```ogr2ogr``` #calling the ogr library - ```-progress``` #show a progress bar
Download ne-gpkg2postgis.sh