Upload
others
View
43
Download
0
Embed Size (px)
Citation preview
Laboratorio di Geomatica
Installing PostgreSQL/PostGIS and QGIS in Windows environment
Marco Negretti – [email protected]
23/12/2011
2Index
✔ Installing QGIS✔ Installing PostgreSQL/PostGIS✔ Upload a shapefile in the DB✔ Add a vector DB layer in QGIS
3Installing QGIS
✔ Home page➢ http://www.qgis.org/
✔ Download➢ http://hub.qgis.org/projects/quantum-gis/wiki/Download
✔ Standalone Installer➢ QGIS-OSGeo4W-1.7.3-00624b3-Setup.exe➢ double click to start the installation
4Installing QGIS
✔ Start installation:
✔ Accept the term of licence agreement✔ Install QGIS➢ if you desire install also the demo data packages
5Installing QGIS
✔ Now QGIS is installed
6Installing QGIS
✔ Double click on desktop icon to start QGIS
7Installing PostgreSQL/PostGIS
✔ Home page➢ http://www.postgresql.org/
✔ Download➢ http://www.postgresql.org/download/windows/
✔ One click installer (Win32bit)➢ postgresql-9.1.2-1-windows.exe➢ double click to start the installation
8Installing PostgreSQL/PostGIS
✔ Start installation:
✔ Accept the default installation option (directory, port,...)
✔ Set a password for the postgres user (and remember it!)
9Installing PostgreSQL/PostGIS
✔ At the end of installation launch the stack builder to install the PostGIS template
10Installing PostgreSQL/PostGIS
✔ Select your version of Postgres and eventually set the proxy parameters connection
11Installing PostgreSQL/PostGIS
✔ Select PostGIS... in Spatial Extension menu
…begins the download procedure...
12Installing PostgreSQL/PostGIS
...and then you can start the installation
13Installing PostgreSQL/PostGIS
✔ Select PostGIS and Create spatial database
14Installing PostgreSQL/PostGIS
✔ Insert the connection information: user, password and port(set during PostgreSQL installation)
15Installing PostgreSQL/PostGIS
✔ When request, enable shp2pgsql plugin:
16Installing PostgreSQL/PostGIS
✔ Installation completed
17Installing PostgreSQL/PostGIS
✔ Start pgAdmin III
18Installing PostgreSQL/PostGIS
✔ Right click to connect to the database
19Upload a shapefile in the DB
✔ Create your spatial database➢ right click to view the menu➢ set the database name and the owner
20Upload a shapefile in the DB
✔ Select as template template_postgis
21Upload a shapefile in the DB
✔ Connect to your new DB➢ there are tables and functions for spatial data
22Upload a shapefile in the DB
✔ Use the plugin to upload data
Select the shapefile
23Upload a shapefile in the DB
✔ If the data are correctly uploaded (press F5 key to refresh), there is a new table:
24Add a vector DB layer in QGIS
✔ Select Add Vector layer
25Add a vector DB layer in QGIS
✔ Select Database as source and PostgreSQL as type
✔ Then click on new to create a new connection
26Add a vector DB layer in QGIS
✔ Insert the connection information
test the connection
27Add a vector DB layer in QGIS
✔ Now, you can open the connection
28Add a vector DB layer in QGIS
✔ Select the coordinate reference system
29Add a vector DB layer in QGIS
✔ If you have more than one map, choose the one to add
30Add a vector DB layer in QGIS
...and finally you can view the map in QGIS
31
QGIS: 1.7.3
PostgreSQL: 9.1.2 (32bit)
PostGIS: 1.5.3
http://creativecommons.org/licenses/by-nc-nd/3.0/
http://www.libreoffice.org/