Professional Documents
Culture Documents
by Tomi Toivio
tomi.olavi.toivio@gmail.com
Shalin Finland
Introduction
This manual documents the GIS platform of the GIS Enhanced Ecological Mapping for Improved
Governance of Natural Resources (GISEEM) project. The GISEEM platform is used by local
communities to document the environmental and cultural knowledge of two forest areas, Giitune
and Karima.
The first part of this manual covers the basics of installation and administration of the server and the
database. Use of uDig for editing is covered in the manuals for the communities. This part requires
some knowledge of computers since it covers issues like database administration and web
programming.
The second part of this manual is for the end-users of the system. It covers the use of uDig software
to edit the geographic data.
The Karima hill data used in this manual is located in: http://www.esnips.com/doc/bb4e64cb-c861-
437a-b7eb-d5b9ecda7653/KARIMA.
- Geoserver, a WMS and WFS server, which serves our data online.
- Postgis/Postgresql database, which is used to store our data.
- uDig, User-Friendly Desktop and Internet GIS, used for editing the data.
All of these are Open Source software and available free of charge for both Windows and Linux
operating systems.
Additional documentation and downloads are available at the following web sites:
- Geoserver: http://www.geoserver.org
- PostgreSQL: http://www.postgresql.org
- uDig: http://udig.refractions.net
First we need to install the software for the system. This means installing uDig, Geoserver and
Postgresql database with the Postgis plugin.
Here the installation instructions are given for Windows XP, since installation varies in different
distributions of Linux. Consult manuals on the web-pages of the different programs to find
installation instructions for Linux.
Before installing any of these programs you need to install Java SDK. If you do not yet have Java
installed on your computer, consult your systems administrator, or go to http://java.sun.com and
follow the installation instructions.
Installing uDig:
1. Go to http://udig.refractions.net with your web browser and download the latest version of
uDig
2. When the download is complete, click on the uDig icon to install it.
7. Wait while uDig installs and the click Finish to close the installation wizard.
Installing Geoserver:
1. Go to http://www.geoserver.org and download the Geoserver.
2. Click on the Geoserver icon to install it.
3. In the following screen click on Next to install Geoserver.
7. In the installation options screen select Postgis Spatial Extensions to be installed on the hard
disk and click on Next.
8. Select a password and retype it. Click Next.
9. In the following screen select UTF-8 for encoding. Enter a different password twice for the
superuser. Click on Next.
10. In the Enable procedural languages screen click Next.
We need to configure the system. First we will create a Postgis database for the Karima data. We
will use pgAdmin III to administrate the database in a convenient fashion.
Creating a database:
1. Select PostgreSQL from the All Programs menu of Windows and click on pgAdmin III.
Now we need to enter data to the database. This is done by converting the data shapefiles into SQL
queries with the use of shp2pgsql program.
SQL files have to be run as SQL queries to create tables in the database.
Create tables in database:
1. Open one of the SQL files you just created in an editor like Notepad. You will see SQL
code. Copy it.
3. In the SQL Query window, paste the SQL code and click on Execute Query.
4. Table has now been created in the database. Repeat this procedure for each SQL file.
Start GeoServer:
1. Go to All Programs, select Geoserver and click on Start GeoServer.
2. A Start GeoServer window appears. You can see messages from the GeoServer that are
often useful so you can see what the program does.
3. Enter address http://localhost:8080/geoserver/ in your web browser.
4. Click on Login. In the next page enter your Username and Password. Click on Submit.
2. Click on Data.
3. Click on DataStores.
4. Click on New.
5. Select Postgis and enter a name for your database. Click New.
6. Now you need to enter the host, port, name, username and password of your database. Click
on Submit.
7. Then click on Apply and Save to save your changes.
FeatureTypes are the different tables in your database. You need to enable each of them to access
them.
Create a FeatureType:
1. Go to Config > Data > Featuretypes and click on New.
2. Select one of the tables in your database and click on New.
3. In the next window you need to select a style for your FeatureType. For point data point is a
good style.
4. Next your need to enter SRS for your data. With Karima data we can use 4326.
You need to do some administrative tasks with the database. Typically you would at least have to
create new columns for tables, edit database contents etc.
1. Open pgAdmin. You will see an Object Browser like the one below. Find our GiseemDB
database.
2. Go to Schemas > public > Tables and you will see the tables of the database. Choose one of the
tables.
3. Here you can do many operations on the tables. Add a new column by right-clicking on a table
and choosing New Object > New Column.
4. In the next window you need to add at least a Name and Data Type to the new column. Then
click on OK.
5. Now, click on View Data to see the contents of the table.
6. A window that allows you to view and edit the table pops up.
7. Click on Refresh after you have edited the table to save your changes. Click on Yes when a pop-
up asks if you want to store data.
Maybe it is a bad idea to add a new column. Close the editor view, and double-click on the table
you just edited. The following window appears.
8. Go to the Columns tab, choose the column you just added, and click on Remove, Ok and Ok.
Using uDig to view data
For editing of this data we use software called uDig, or User-friendly Desktop and Internet GIS.
Start uDig:
1. First you need to start the uDig software. Click on Start icon at the left bottom of the screen.
3. Now the uDig will start, and it will look like this.
Start a new project:
1. We need to start a new project. Go with the mouse pointer to File in the top left corner, then
go to New, and click on New Project.
2. You will see a New Project window like this. Project Name and Directory are not important
in training. Just click on Finish.
Add layers to project:
1. Now we need to add Karima layers to the project. Go to Layer at the top bar and click on
Add.
2. You will see Add Data window like this. Click on Web Feature Server and then click on
Next.
3. Here you need to enter internet address http://localhost:8080/geoserver/wfs?
service=WFS&request=GetCapabilities to the URL field and then click on Next.
4. You will see a Resource Selection window like this. First click on the box next to My
Geoserver WFS so that all Karima layers are selected. Then click on Finish.
5. Now the program has loaded all the Karima layers. It looks like this.
View layers:
1. On the left you can see a menu of the different layers. If the box is checked it means the
layer is visible. Layers that consist of points have a little box symbol, layers that consist of
lines have a line symbol, and those that consist of polygons have a polygon symbol.
2. Now let us navigate around the map, clicking on the plus and minus Zoom buttons will take
you closer or farther from the ground. Click on the plus button zoom into the map.
3. After you have zoomed in for a few times it should look like this.
4. Click on the Pan Map View button from the top bar.
5. Then hold down the mouse button above the map and move the mouse around to move the
map.
View a single layer:
1. Select karimaclans_Type as the active layer. Then click on the Zoom to layers button above
the layers menu to zoom to your active layer. You should see the whole map again.
2. Tick off all boxes except karimaclans_Type so that all layers except that one are invisible.
3. You can see that now only the Karima clans layer is visible.
4. Then select Table from the bottom of the page and you will see information on different
clans. Click on one of the clans.
3. You see a Color window like this. Choose blue or some other color suitable for a river and
click Ok.
6. Now the rivers are blue and their names are visible.
To commit changes:
Two most important buttons when editing with uDig are these:
Commit Changes button:
Rollback Changes button:
You should click on Commit Changes button each time you change something. Unless you have
made a mistake, in which case you should click on Rollback Changes button.
To view information:
1. Now let us view Karima factory data. Tick boxes of all layers so that all layers are visible.
Select karimafactory_Type on the menu, it becomes the active layer.
5. Let us add some information. First click on Table button next to the Information button, and
you will see a table of the Karima Factory data.
6. Then you can click on the table below the information field and write something about the
factory.
7. To save the information you have written you need to click on the Commit Changes button
at the top bar. When you are doing actual editing always click on this button after you have
added something new to the Karima data!
Add a point:
1. Now let us add a new Factory to Karima. Click on the Arrow next to this Icon in the top bar
and select Create Point tool.
2. Then click somewhere on the map and you will see a new factory.
3. At the bottom of the page you see the information of the new factory. Click on name field
and enter a name for the new factory.
4. Now you need to click Commit Changes again so that the new factory is saved into the
database.
Create polygons:
1. It is time to create polygons. Now let us add another forest. Select karimaforest_Type on the
menu left side.
3. Click somewhere around the map so that you draw a polygon. The polygon has to be closed,
so that you need to click again on the first point when you stop drawing.
4. Now you can select table from the bottom menu bar and add a name to the layer.
5. But then again, maybe we should not add imaginary forests. Select Delete Feature tool from
the top bar.
4. Maybe we don’t want that road anyhow. Click on Rollback Changes Button on the top bar,
next of the Commit changes button, and the road will disappear.
3. Then check Label to make the name of the school visible on the map. Click on Apply and
Close.
4. Next click on the Triangle or Focus button to focus on your current layer.
5. The only school on the map should look like this now.
Create school:
1. Now, choose Create Point Tool from the top bar to create another school.
2. Click somewhere on the map to create another school.
3. You can see the information table of the new school at the bottom of the page. Select name
field and enter a name for the school.
Move points:
1. But what if the school is in the wrong place? It has to be moved a bit. Select Edit Geometry
from the top menu bar.
2. Next you can hold the school by holding down your mouse button above it, and move it
around a bit. The school will be a yellow box in its new location.
3. When you are happy with the school’s new location, click on Commit Changes to make it
stay there.
4. Go to the table again and click on the Story column on your New Schools’s row. Write a
little story.