PostGIS: A Standards Based Geographic Extension for PostgreSQL
Installing PostgreSQL/PostGIS and QGIS in...
-
Upload
dinhnguyet -
Category
Documents
-
view
225 -
download
0
Transcript of Installing PostgreSQL/PostGIS and QGIS in...
![Page 1: Installing PostgreSQL/PostGIS and QGIS in …geomatica.como.polimi.it/corsi/sw_gis/postgis_qgis_inst.pdf · Laboratorio di Geomatica Installing PostgreSQL/PostGIS and QGIS in Windows](https://reader030.fdocuments.in/reader030/viewer/2022013015/5b64c86a7f8b9a6c178dbff3/html5/thumbnails/1.jpg)
Laboratorio di Geomatica
Installing PostgreSQL/PostGIS and QGIS in Windows environment
Marco Negretti – [email protected]
23/12/2011
![Page 2: Installing PostgreSQL/PostGIS and QGIS in …geomatica.como.polimi.it/corsi/sw_gis/postgis_qgis_inst.pdf · Laboratorio di Geomatica Installing PostgreSQL/PostGIS and QGIS in Windows](https://reader030.fdocuments.in/reader030/viewer/2022013015/5b64c86a7f8b9a6c178dbff3/html5/thumbnails/2.jpg)
2Index
✔ Installing QGIS✔ Installing PostgreSQL/PostGIS✔ Upload a shapefile in the DB✔ Add a vector DB layer in QGIS
![Page 3: Installing PostgreSQL/PostGIS and QGIS in …geomatica.como.polimi.it/corsi/sw_gis/postgis_qgis_inst.pdf · Laboratorio di Geomatica Installing PostgreSQL/PostGIS and QGIS in Windows](https://reader030.fdocuments.in/reader030/viewer/2022013015/5b64c86a7f8b9a6c178dbff3/html5/thumbnails/3.jpg)
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
![Page 4: Installing PostgreSQL/PostGIS and QGIS in …geomatica.como.polimi.it/corsi/sw_gis/postgis_qgis_inst.pdf · Laboratorio di Geomatica Installing PostgreSQL/PostGIS and QGIS in Windows](https://reader030.fdocuments.in/reader030/viewer/2022013015/5b64c86a7f8b9a6c178dbff3/html5/thumbnails/4.jpg)
4Installing QGIS
✔ Start installation:
✔ Accept the term of licence agreement✔ Install QGIS➢ if you desire install also the demo data packages
![Page 5: Installing PostgreSQL/PostGIS and QGIS in …geomatica.como.polimi.it/corsi/sw_gis/postgis_qgis_inst.pdf · Laboratorio di Geomatica Installing PostgreSQL/PostGIS and QGIS in Windows](https://reader030.fdocuments.in/reader030/viewer/2022013015/5b64c86a7f8b9a6c178dbff3/html5/thumbnails/5.jpg)
5Installing QGIS
✔ Now QGIS is installed
![Page 6: Installing PostgreSQL/PostGIS and QGIS in …geomatica.como.polimi.it/corsi/sw_gis/postgis_qgis_inst.pdf · Laboratorio di Geomatica Installing PostgreSQL/PostGIS and QGIS in Windows](https://reader030.fdocuments.in/reader030/viewer/2022013015/5b64c86a7f8b9a6c178dbff3/html5/thumbnails/6.jpg)
6Installing QGIS
✔ Double click on desktop icon to start QGIS
![Page 7: Installing PostgreSQL/PostGIS and QGIS in …geomatica.como.polimi.it/corsi/sw_gis/postgis_qgis_inst.pdf · Laboratorio di Geomatica Installing PostgreSQL/PostGIS and QGIS in Windows](https://reader030.fdocuments.in/reader030/viewer/2022013015/5b64c86a7f8b9a6c178dbff3/html5/thumbnails/7.jpg)
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
![Page 8: Installing PostgreSQL/PostGIS and QGIS in …geomatica.como.polimi.it/corsi/sw_gis/postgis_qgis_inst.pdf · Laboratorio di Geomatica Installing PostgreSQL/PostGIS and QGIS in Windows](https://reader030.fdocuments.in/reader030/viewer/2022013015/5b64c86a7f8b9a6c178dbff3/html5/thumbnails/8.jpg)
8Installing PostgreSQL/PostGIS
✔ Start installation:
✔ Accept the default installation option (directory, port,...)
✔ Set a password for the postgres user (and remember it!)
![Page 9: Installing PostgreSQL/PostGIS and QGIS in …geomatica.como.polimi.it/corsi/sw_gis/postgis_qgis_inst.pdf · Laboratorio di Geomatica Installing PostgreSQL/PostGIS and QGIS in Windows](https://reader030.fdocuments.in/reader030/viewer/2022013015/5b64c86a7f8b9a6c178dbff3/html5/thumbnails/9.jpg)
9Installing PostgreSQL/PostGIS
✔ At the end of installation launch the stack builder to install the PostGIS template
![Page 10: Installing PostgreSQL/PostGIS and QGIS in …geomatica.como.polimi.it/corsi/sw_gis/postgis_qgis_inst.pdf · Laboratorio di Geomatica Installing PostgreSQL/PostGIS and QGIS in Windows](https://reader030.fdocuments.in/reader030/viewer/2022013015/5b64c86a7f8b9a6c178dbff3/html5/thumbnails/10.jpg)
10Installing PostgreSQL/PostGIS
✔ Select your version of Postgres and eventually set the proxy parameters connection
![Page 11: Installing PostgreSQL/PostGIS and QGIS in …geomatica.como.polimi.it/corsi/sw_gis/postgis_qgis_inst.pdf · Laboratorio di Geomatica Installing PostgreSQL/PostGIS and QGIS in Windows](https://reader030.fdocuments.in/reader030/viewer/2022013015/5b64c86a7f8b9a6c178dbff3/html5/thumbnails/11.jpg)
11Installing PostgreSQL/PostGIS
✔ Select PostGIS... in Spatial Extension menu
…begins the download procedure...
![Page 12: Installing PostgreSQL/PostGIS and QGIS in …geomatica.como.polimi.it/corsi/sw_gis/postgis_qgis_inst.pdf · Laboratorio di Geomatica Installing PostgreSQL/PostGIS and QGIS in Windows](https://reader030.fdocuments.in/reader030/viewer/2022013015/5b64c86a7f8b9a6c178dbff3/html5/thumbnails/12.jpg)
12Installing PostgreSQL/PostGIS
...and then you can start the installation
![Page 13: Installing PostgreSQL/PostGIS and QGIS in …geomatica.como.polimi.it/corsi/sw_gis/postgis_qgis_inst.pdf · Laboratorio di Geomatica Installing PostgreSQL/PostGIS and QGIS in Windows](https://reader030.fdocuments.in/reader030/viewer/2022013015/5b64c86a7f8b9a6c178dbff3/html5/thumbnails/13.jpg)
13Installing PostgreSQL/PostGIS
✔ Select PostGIS and Create spatial database
![Page 14: Installing PostgreSQL/PostGIS and QGIS in …geomatica.como.polimi.it/corsi/sw_gis/postgis_qgis_inst.pdf · Laboratorio di Geomatica Installing PostgreSQL/PostGIS and QGIS in Windows](https://reader030.fdocuments.in/reader030/viewer/2022013015/5b64c86a7f8b9a6c178dbff3/html5/thumbnails/14.jpg)
14Installing PostgreSQL/PostGIS
✔ Insert the connection information: user, password and port(set during PostgreSQL installation)
![Page 15: Installing PostgreSQL/PostGIS and QGIS in …geomatica.como.polimi.it/corsi/sw_gis/postgis_qgis_inst.pdf · Laboratorio di Geomatica Installing PostgreSQL/PostGIS and QGIS in Windows](https://reader030.fdocuments.in/reader030/viewer/2022013015/5b64c86a7f8b9a6c178dbff3/html5/thumbnails/15.jpg)
15Installing PostgreSQL/PostGIS
✔ When request, enable shp2pgsql plugin:
![Page 16: Installing PostgreSQL/PostGIS and QGIS in …geomatica.como.polimi.it/corsi/sw_gis/postgis_qgis_inst.pdf · Laboratorio di Geomatica Installing PostgreSQL/PostGIS and QGIS in Windows](https://reader030.fdocuments.in/reader030/viewer/2022013015/5b64c86a7f8b9a6c178dbff3/html5/thumbnails/16.jpg)
16Installing PostgreSQL/PostGIS
✔ Installation completed
![Page 17: Installing PostgreSQL/PostGIS and QGIS in …geomatica.como.polimi.it/corsi/sw_gis/postgis_qgis_inst.pdf · Laboratorio di Geomatica Installing PostgreSQL/PostGIS and QGIS in Windows](https://reader030.fdocuments.in/reader030/viewer/2022013015/5b64c86a7f8b9a6c178dbff3/html5/thumbnails/17.jpg)
17Installing PostgreSQL/PostGIS
✔ Start pgAdmin III
![Page 18: Installing PostgreSQL/PostGIS and QGIS in …geomatica.como.polimi.it/corsi/sw_gis/postgis_qgis_inst.pdf · Laboratorio di Geomatica Installing PostgreSQL/PostGIS and QGIS in Windows](https://reader030.fdocuments.in/reader030/viewer/2022013015/5b64c86a7f8b9a6c178dbff3/html5/thumbnails/18.jpg)
18Installing PostgreSQL/PostGIS
✔ Right click to connect to the database
![Page 19: Installing PostgreSQL/PostGIS and QGIS in …geomatica.como.polimi.it/corsi/sw_gis/postgis_qgis_inst.pdf · Laboratorio di Geomatica Installing PostgreSQL/PostGIS and QGIS in Windows](https://reader030.fdocuments.in/reader030/viewer/2022013015/5b64c86a7f8b9a6c178dbff3/html5/thumbnails/19.jpg)
19Upload a shapefile in the DB
✔ Create your spatial database➢ right click to view the menu➢ set the database name and the owner
![Page 20: Installing PostgreSQL/PostGIS and QGIS in …geomatica.como.polimi.it/corsi/sw_gis/postgis_qgis_inst.pdf · Laboratorio di Geomatica Installing PostgreSQL/PostGIS and QGIS in Windows](https://reader030.fdocuments.in/reader030/viewer/2022013015/5b64c86a7f8b9a6c178dbff3/html5/thumbnails/20.jpg)
20Upload a shapefile in the DB
✔ Select as template template_postgis
![Page 21: Installing PostgreSQL/PostGIS and QGIS in …geomatica.como.polimi.it/corsi/sw_gis/postgis_qgis_inst.pdf · Laboratorio di Geomatica Installing PostgreSQL/PostGIS and QGIS in Windows](https://reader030.fdocuments.in/reader030/viewer/2022013015/5b64c86a7f8b9a6c178dbff3/html5/thumbnails/21.jpg)
21Upload a shapefile in the DB
✔ Connect to your new DB➢ there are tables and functions for spatial data
![Page 22: Installing PostgreSQL/PostGIS and QGIS in …geomatica.como.polimi.it/corsi/sw_gis/postgis_qgis_inst.pdf · Laboratorio di Geomatica Installing PostgreSQL/PostGIS and QGIS in Windows](https://reader030.fdocuments.in/reader030/viewer/2022013015/5b64c86a7f8b9a6c178dbff3/html5/thumbnails/22.jpg)
22Upload a shapefile in the DB
✔ Use the plugin to upload data
Select the shapefile
![Page 23: Installing PostgreSQL/PostGIS and QGIS in …geomatica.como.polimi.it/corsi/sw_gis/postgis_qgis_inst.pdf · Laboratorio di Geomatica Installing PostgreSQL/PostGIS and QGIS in Windows](https://reader030.fdocuments.in/reader030/viewer/2022013015/5b64c86a7f8b9a6c178dbff3/html5/thumbnails/23.jpg)
23Upload a shapefile in the DB
✔ If the data are correctly uploaded (press F5 key to refresh), there is a new table:
![Page 24: Installing PostgreSQL/PostGIS and QGIS in …geomatica.como.polimi.it/corsi/sw_gis/postgis_qgis_inst.pdf · Laboratorio di Geomatica Installing PostgreSQL/PostGIS and QGIS in Windows](https://reader030.fdocuments.in/reader030/viewer/2022013015/5b64c86a7f8b9a6c178dbff3/html5/thumbnails/24.jpg)
24Add a vector DB layer in QGIS
✔ Select Add Vector layer
![Page 25: Installing PostgreSQL/PostGIS and QGIS in …geomatica.como.polimi.it/corsi/sw_gis/postgis_qgis_inst.pdf · Laboratorio di Geomatica Installing PostgreSQL/PostGIS and QGIS in Windows](https://reader030.fdocuments.in/reader030/viewer/2022013015/5b64c86a7f8b9a6c178dbff3/html5/thumbnails/25.jpg)
25Add a vector DB layer in QGIS
✔ Select Database as source and PostgreSQL as type
✔ Then click on new to create a new connection
![Page 26: Installing PostgreSQL/PostGIS and QGIS in …geomatica.como.polimi.it/corsi/sw_gis/postgis_qgis_inst.pdf · Laboratorio di Geomatica Installing PostgreSQL/PostGIS and QGIS in Windows](https://reader030.fdocuments.in/reader030/viewer/2022013015/5b64c86a7f8b9a6c178dbff3/html5/thumbnails/26.jpg)
26Add a vector DB layer in QGIS
✔ Insert the connection information
test the connection
![Page 27: Installing PostgreSQL/PostGIS and QGIS in …geomatica.como.polimi.it/corsi/sw_gis/postgis_qgis_inst.pdf · Laboratorio di Geomatica Installing PostgreSQL/PostGIS and QGIS in Windows](https://reader030.fdocuments.in/reader030/viewer/2022013015/5b64c86a7f8b9a6c178dbff3/html5/thumbnails/27.jpg)
27Add a vector DB layer in QGIS
✔ Now, you can open the connection
![Page 28: Installing PostgreSQL/PostGIS and QGIS in …geomatica.como.polimi.it/corsi/sw_gis/postgis_qgis_inst.pdf · Laboratorio di Geomatica Installing PostgreSQL/PostGIS and QGIS in Windows](https://reader030.fdocuments.in/reader030/viewer/2022013015/5b64c86a7f8b9a6c178dbff3/html5/thumbnails/28.jpg)
28Add a vector DB layer in QGIS
✔ Select the coordinate reference system
![Page 29: Installing PostgreSQL/PostGIS and QGIS in …geomatica.como.polimi.it/corsi/sw_gis/postgis_qgis_inst.pdf · Laboratorio di Geomatica Installing PostgreSQL/PostGIS and QGIS in Windows](https://reader030.fdocuments.in/reader030/viewer/2022013015/5b64c86a7f8b9a6c178dbff3/html5/thumbnails/29.jpg)
29Add a vector DB layer in QGIS
✔ If you have more than one map, choose the one to add
![Page 30: Installing PostgreSQL/PostGIS and QGIS in …geomatica.como.polimi.it/corsi/sw_gis/postgis_qgis_inst.pdf · Laboratorio di Geomatica Installing PostgreSQL/PostGIS and QGIS in Windows](https://reader030.fdocuments.in/reader030/viewer/2022013015/5b64c86a7f8b9a6c178dbff3/html5/thumbnails/30.jpg)
30Add a vector DB layer in QGIS
...and finally you can view the map in QGIS
![Page 31: Installing PostgreSQL/PostGIS and QGIS in …geomatica.como.polimi.it/corsi/sw_gis/postgis_qgis_inst.pdf · Laboratorio di Geomatica Installing PostgreSQL/PostGIS and QGIS in Windows](https://reader030.fdocuments.in/reader030/viewer/2022013015/5b64c86a7f8b9a6c178dbff3/html5/thumbnails/31.jpg)
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/