20.10.2014 Views

TRD 05: Data Presentation techniques (Mapping) Quantum GIS ...

TRD 05: Data Presentation techniques (Mapping) Quantum GIS ...

TRD 05: Data Presentation techniques (Mapping) Quantum GIS ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

E.4 Post<strong>GIS</strong><br />

psql test<br />

select version();<br />

version<br />

----------------------------------------------------------------------<br />

PostgreSQL 8.x.x on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.3.1<br />

(SuSE Linux)<br />

(1 row)<br />

\q<br />

9. PostgreSQL install is done<br />

E.4. Post<strong>GIS</strong><br />

Note:: You must edit the Post<strong>GIS</strong> Makefile and make sure that USE_GEOS=1 is set. Also adjust<br />

GEOS_DIR to point to your GEOS installation directory.<br />

1. Download Post<strong>GIS</strong> source from http://postgis.refractions.net (4)<br />

2. Untar Post<strong>GIS</strong> into the contrib subdirectory of the PostgreSQL build directory. The contrib<br />

subdirectory is located in the directory created in step 3 of the PostgreSQL installation process.<br />

3. Change to the postgis subdirectory<br />

4. Edit the Makefile to enable GEOS support (see the note above)<br />

5. Post<strong>GIS</strong> provides a manual in the doc/html subdirectory that explains the build process (see<br />

the Installation section)<br />

6. The quick and dirty steps to install Post<strong>GIS</strong> are:<br />

cd contrib<br />

gunzip postgis-1.x.x.tar.gz<br />

tar xvf postgis-1.x.x.tar<br />

cd postgis-1.x.x<br />

make<br />

sudo make install<br />

createlang plpgsql yourtestdatabase<br />

psql -d yourtestdatabase -f lwpostgis.sql<br />

psql -d yourtestdatabase -f spatial_ref_sys.sql<br />

The better way to install Post<strong>GIS</strong> is to carefully follow the instructions in the Post<strong>GIS</strong> manual in the<br />

doc/html subdirectory or the online manual at http://postgis.refractions.net/docs<br />

Q<strong>GIS</strong> 0.8 User Guide 98

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!