Hello everyone, welcome to QGIS Tutorial. Today, we are going to learn how to open a PostGIS table in QGIS. I am using QGIS version 3.2 Bonna on this tutorial. PostGIS is a PostgreSQL spatial extension that enable the PostgreSQL database to store spatial data/information. It is great to have PostGIS in our GIS system since it can be used to centralize the spatial database.
What you will learn
- Connect to PostGIS from QGIS
- Open PostGIS spatial dataset in QGIS
First thing first, we need to install and configure PostGIS in the server. Please read the following article to install and setup PostGIS on your server. Install PostGIS on Ubuntu 18.04. Once you have installed PostGIS, now follow these steps to open the PostGIS table in QGIS.
Step 1. Create a New PostGIS Connection
Open QGIS and then go to Layer | Data Source Manager. Click PostgreSQL from the left panel. We are going to create a new PostGIS connection through this page.
As you can see, the list is empty. We are going to create a new one. Click New button to configure a new PostGIS connection.
You will need the following information:
- Hostname or IP address of the PostgreSQL Server
- Port number
- Database name
- User and password
Hit OK when all done. Make you test the connection first to make sure everything is working as we expected.
Step 2. Open PostGIS Table
Click Connect and your PostGIS tables will be visible. Select the table you want to open and click Add. In a moment, your PostGIS table is ready.
Find more QGIS Tutorial for Beginners.
How to Export PostGIS Layer to Shapefile in QGIS | GIS TutorialApril 15, 2020
[…] Before we can open the PostGIS table in QGIS, first we need to define or create a new PostGIS connection. Read the following article to find out how to connect QGIS to PostGIS database. […]