Getting Started with PostGIS – Import Shapefiles (SHP Files)

You will need a PostgreSQL server with PostGIS extensions enabled on a database.

Find some data you want to plot. A good free resource is

In this tutorial, we will use Internet Towers in Parkland County, Alberta, Canada.

Install the PostgreSQL Client software if it is not installed to provide shp2pgsql

# dnf install -y postgis30_12-client

Download and convert the SHP file to Postgres and insert into the table

# su - postgres
$ cd /tmp
$ wget
$ unzip
$ shp2pgsql 0260890c-15bb-4802-ae91-d48265593dfa202047-1-16linhf.im31.shp | psql -d gisdb

You should see the data in pgAdmin 4. Click the eye icon to view on a map.

The data may also be viewed in QGIS.

Was this helpful?

1 / 1

Leave a Reply 0

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.