In this post, we will using the SPIT plugin to upload shapefiles to PostGIS database.
Make sure you have installed the SPIT plugin before starting this tutorial.
Launch the QGIS Desktop, on the main menu – Database – Spit – Import Shapefiles to PostgreSQL
A SPIT dialog window will open. Select your connections(Postgres in this case).
Click ‘Connect’ . You may be prompted to supply your PostGIS login credentials
Once connected, Click on ‘Add’ to load the shape file from file
Click Ok after loading the shape file into the dialog window.
The shapefile is then imported into the database of the PostGIS Server.
To verify this, go to the QGIS Desktop main menu and click ‘Add PostGIS Layers’
Select your Connection and click ‘Connect’. Once the connection is made,
a link to the public will appear.
Click on the public. We select a PostGIS Table.
AS seen in the screenshot above, the shapefile has been uploaded into the PostGIS database.
Click ‘Add’ and the features will be displayed as a vector layer on the map canvas
Thank you for following the blog.