Using the QGIS SPIT plugin to upload Shapefiles to PostGIS database

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

b1

 

A SPIT dialog window will open. Select your connections(Postgres in this case).

b2

 

Click ‘Connect’ . You may be prompted to supply your PostGIS login credentials

b3

 

Once connected, Click on ‘Add’ to load the shape file from file

b4

 

Click Ok after loading the shape file into the dialog window.

The shapefile is then imported into the database of the PostGIS Server.

b6

 

To verify this, go to the QGIS Desktop main menu and click ‘Add PostGIS Layers’

b17

 

Select your Connection and click ‘Connect’. Once the connection is made,

a link to the public will appear.

b8

 

Click on the public. We select a PostGIS Table.

Click ‘Add’

b9

 

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

b12

 

 

Thank you for following the blog.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s