Professional Documents
Culture Documents
Tomi Toivio
Shalin Finland
1
GISEEM Technical Manual
Table of Contents
GISEEM Technical Manual.................................................................................................................1
GISEEM Manual..................................................................................................................................4
Introduction..........................................................................................................................................4
Components of the GISEEM Platform.................................................................................................4
Additional documentation....................................................................................................................5
License..................................................................................................................................................5
Installation of the software...................................................................................................................5
Installing Java.......................................................................................................................................5
Installing uDig......................................................................................................................................8
Installing Geoserver on Ubuntu Linux ..............................................................................................11
Postgis installation on Ubuntu Linux.................................................................................................16
2
GISEEM Technical Manual
3
GISEEM Technical Manual
GISEEM Manual
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 three areas in Kenya,
Giitune, Mukogodo 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 last part of the manual.
The section about editing GIS data with uDig is useful for the community participants. Editing with
uDig requires some understanding about basic use of computers. Use of uDig is quite similar to
using a vector drawing program such as Inkscape. Basically you are just drawing maps instead
vector graphics.
The first sections are about installation, administration and configuration of Geoserver and the
Postgis database for the administrators of the GIS platform. Installation and administration is
covered for both Ubuntu Linux and Windows XP. Typically command line is used for Linux
installation while Windows has easy to use graphical installers.
The administrator would need basic knowledge about GPS and GIS, basic knowledge of SQL
databases, and some command line Linux administration skills if Linux is used. JavaScript web
programming skills are useful if there is a need to create some more complicated interfaces to the
data with OpenLayers. OpenLayers programming is not covered in this manual.
This manual uses Karima data collected by the Giseem project in the examples. You can download
this data from eSnips: http://www.esnips.com/doc/210c19b6-7c19-4a09-83e4-
065e70ce8a33/KARIMA
This manual is written using simple step-by-step procedures and screen shots whenever possible.
- Geoserver, a WMS and WFS server, which serves our data online.
- Postgis/Postgresql database, which is used to store our GIS 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.
4
GISEEM Technical Manual
Additional documentation
Additional documentation and software downloads are available at the following web sites:
- Geoserver: http://www.geoserver.org
- PostgreSQL: http://www.postgresql.org
- PostGIS: http://postgis.refractions.net/
- uDig: http://udig.refractions.net
- OpenLayers: http://openlayers.org/
License
This work is licensed under the Creative Commons Attribution 3.0 Unported License. To view a
copy of this license, visit http://creativecommons.org/licenses/by/3.0/ or send a letter to Creative
Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
Here the installation instructions are given for Windows XP and Ubuntu Linux. You may also want
to consult the web-pages, manuals and mailing lists of the programs if you run into problems.
Installing Java
Before installing any of these programs you need to install Java JDK. 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. Remember you need the JDK, not the runtime environment!
After you have installed JDK you need to set up the Java_Home environmental variable.
5
GISEEM Technical Manual
3. Click on Find.
4. Click on Next.
6
GISEEM Technical Manual
5. Now you need to browse to the folder containing the JDK and click on Next.
6. Click on Next.
7
GISEEM Technical Manual
7. Click on Ok.
Installing uDig
Installing uDig:
1. Go to http://udig.refractions.net with your web browser and download the latest version of
uDig
8
GISEEM Technical Manual
2. When the download is complete, click on the uDig icon to install it.
9
GISEEM Technical Manual
6. In the following window, select where you like to install program’s short cuts and click on
Install.
7. Wait while uDig installs and the click Finish to close the installation wizard.
10
GISEEM Technical Manual
11
GISEEM Technical Manual
12
GISEEM Technical Manual
8. Find the path to your Java Development Kit and click on Next.
13
GISEEM Technical Manual
9. Select Geoserver Data Directory. The default path should be fine. Click on Next.
10. Choose a User Name and Password for Geoserver administrator. Click on Next.
14
GISEEM Technical Manual
15
GISEEM Technical Manual
16
GISEEM Technical Manual
17
GISEEM Technical Manual
6. Select a password for your database's postgres superuser. You also have to re-write it to
avoid typos. Write it down!
18
GISEEM Technical Manual
7. Select a port the server should listen on. The default port 5432 should be fine.
8. Now you can select a locale and whether to install pl/psql in template1 database. Here we
can just use the defaults and click on Next.
19
GISEEM Technical Manual
9. In the next screen just click on Next. Installation takes some time, just wait. You will see a
progress bar indicating the progress of the installation.
10. In the last screen Launch stack builder has to be checked. Click on Finish.
20
GISEEM Technical Manual
11. In the stack builder you need to select your PostgreSQL installation, probably it is the
default PostgreSQL 8.4. on port 5432. Then click on Next.
12. In the applications to be installed screen select Spatial Extensions and check PostGIS 1.4 for
PostgreSQL 8.4 v1.4.0 to be installed and click on Next.
21
GISEEM Technical Manual
13. Select the mirror that is closest to you and click on Next.
14. Select a download directory and click on Next. It will now download the application.
22
GISEEM Technical Manual
15. In the following screen you need to just click Next to start the installation.
23
GISEEM Technical Manual
17. Here you can leave install PostGIS and Create spatial database options enabled and click on
Next.
18. In the next screen select the location to install the PostGIS. Then click on Next.
24
GISEEM Technical Manual
19. In the next screen you have to enter the password for the database. You selected the
password earlier in the installation procedure. Then click on Next.
20. Now you have to choose a name for your spatial database. Why not write Giseem or
GiseemDB. Then click on Install.
25
GISEEM Technical Manual
26
GISEEM Technical Manual
Now we need to configure the system for use. First we will create a Postgis database for the Karima
data. We will use pgAdmin III to administrate the database in a convenient fashion. You could also
administrate it from the command line but this method is easier to understand.
Creating a database:
1. Select PostgreSQL from the All Programs menu of Windows or the corresponding menu of
Ubuntu and click on pgAdmin III.
3. Now you have to create a new connection. Click on the first icon.
4. Now you need to enter the information for your database connection. You can write Giseem
in the connection name. Host is the IP address of your Geoserver computer, but if you are on
27
GISEEM Technical Manual
the same computer you can write localhost. Write the password you chose when you
installed PostgreSQL. Click on OK.
5. Now you can see your database in the Object browser of your pgAdmin III.
28
GISEEM Technical Manual
7. In the New Database window write a name for your database, such as giseemDB. Select
postgres as the owner. Select postgres as the owner. Select postgis as the template. Use
pg_default tablespace. Click on OK.
8. Now you can see your new database in the Object Browser.
29
GISEEM Technical Manual
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.
2. Unrar the archive. You may need to find a software for this if none is installed on your
operating system.
5. Repeat this step for each shapefile. SQL filename and table name should be the same as the
name of the shapefile.
30
GISEEM Technical Manual
3. In the SQL Query window, paste the SQL code into the SQL Editor.
5. Table has now been created in the database. Repeat this procedure for each SQL file you
just created from the Karima shapefiles.
Starting Geoserver
31
GISEEM Technical Manual
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.
32
GISEEM Technical Manual
4. In the top of the page you need to write your Username and Password and click on Submit.
33
GISEEM Technical Manual
3. Leave cite as it is. Here you can write a Data Source Name and a Description for your
database. It is not important what these are.
4. Below these you see more fields to fill. Mostly the default ones should work. Just write
database name as giseemDB (if you created database with that name), user is postgres and
then write the password you selected for your database.
34
GISEEM Technical Manual
5. Click on Save.
6. You will see that the Karima data is now loaded into the Geoserver from the database.
35
GISEEM Technical Manual
1. Now you need to click on layers from the bar on the left side of the browser screen.
36
GISEEM Technical Manual
5. In the next screen you can write an abstract about the layer.
37
GISEEM Technical Manual
9. Below that you see the bounding box coordinates. Click on both Compute from native
bounds and Compute from data to compute them automatically.
10. In the bottom of the page is the Save button. Click on it.
Viewing a layer:
2. You will see a list of layers. You will see that there are three different preview options.
Click on OpenLayers.
38
GISEEM Technical Manual
4. If you click on KML the layer will be opened in Google Earth (if you have Google Earth
installed).
39
GISEEM Technical Manual
5. Click one of your layers to add it. Repeat these steps to add all the layers you need.
7. Click on Save.
Postgis Administration
You need to do some administrative tasks with the database. Typically you would at least have to
create new columns for tables and edit table contents. In this section there are the procedures for
some basic editing of the database with Pgadmin3.
40
GISEEM Technical Manual
1. Open pgAdmin3. You will see an Object Browser like the one below. Find our Giseem
database.
2. Go to Schemas > public > Tables and you will see the tables of the database. Choose one
of the tables.
41
GISEEM Technical Manual
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.
42
GISEEM Technical Manual
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.
43
GISEEM Technical Manual
8. 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.
44
GISEEM Technical Manual
Udig is available for both Windows and Linux. Installation is very simple. You can go to
http://udig.refractions.net to download uDig for your operating system. Follow the installation
instructions. You can also find additional documentation for uDig from the website.
Before you start, you need to know the internet address (URL) of the Geoserver you are using to
access the data. Ask for the address of the Geoserver from the person administering the Geoserver.
Start uDig:
45
GISEEM Technical Manual
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.
46
GISEEM Technical Manual
2. You will see a New Project window like this. You can select a Project Name and Directory
to save your project in. Then click on Finish.
47
GISEEM Technical Manual
Menu bar is similar to all Linux or Windows programs that use a graphical interface. The various
functions will be covered later in this manual.
Tool bar
At the top of the uDig window you can see a toolbar. This contains the different tools that can be
used in uDig.
You can change the function of the buttons with small arrows pointing downwards by clicking on
the arrow.
The next two buttons are for saving the project you are working on.
These buttons allow you to move backward and forward in the history of actions you have
committed in uDig.
The first button is for redrawing the map if needed and the second is for halting the drawing of the
map if it is too slow.
This button zooms so that all the data in your uDig project is visible.
These two buttons zoom into (plus sign) and out of (minus sign) your project.
48
GISEEM Technical Manual
This button allows you to commit the changes you have made. This means the changes will not be
saved into the shapefile or database before you click on this button.
This button erases the changes you have made. They will not be saved into the database or
shapefile.
This button allows you to zoom around in your map with your mouse.
This one is for panning around the map with your mouse.
This one is for box selection. It means you can draw a box with your mouse and all the points inside
the box are selected.
The next button has two different functions. You can switch between these by clicking on the
arrow. The first function is for getting data of a point on the map. The second function is for
measuring distance on the map.
The next button has four different functions that can be changed from the arrow. The first function
allows you to edit geometries. The second function allows you to add vertex points to a geometry.
The third one is for removing vertexes. The fourth one is for cutting holes in areas. Not all of these
functions can be used on all layer types. Only editing of geometries is available for a point layer.
Cutting holes is only allowed for area layers.
The next button has four different functions. The first function allows you to create areas, lines or
points, depending on the type of layer you are in. The next function allows you to fill an area. The
third one is for creating a rectangle. The last one is for creating an ellipse. Only the first function is
available with line and polygon layers.
49
GISEEM Technical Manual
Project window
In the project window you can see your projects and the layers in each project. This usually
important only if you have many projects open at the same time.
Layers menu
Layers menu allows you to select various layers you have in your project.
The checkbox next to a layer means the layer is visible. If you uncheck it the layer becomes
invisible.
Right-clicking on a layer allows you to perform a number of actions on the layer: copy it, paste it,
delete it, change style, zoom to layer, rename, various operations, export to a file type, and to see
it's properties. These are covered later in this manual.
50
GISEEM Technical Manual
The biggest screen shows the map. Here is where you can view the map layers and edit them.
In the bottom of the main window you can see a bar. This bar has the scale of the map, the
projection of the map and the coordinates of your cursor.
Catalog view
In the bottom we can see one more window. This is mostly useful to us in the table view, which you
can access by clicking on the Table tab.
51
GISEEM Technical Manual
In the Table view it is possible to view and edit the data contained in the various layers. This is very
useful for editing the GIS data.
A satellite basemap is the best solution here. Google Maps cannot be used in uDig due to license
reasons. Therefore we have to use a Landsat satellite image, which does not have as high resolution
as Google Maps, but is still useful in some cases.
You can download a satellite image from Landsat in the following address:
http://www.landsat.org/ortho/index.php
4. Click on elp168r060_7t20000221.tar.gz and download it. This will take some time.
5. Unzip the archive when the download is complete.
52
GISEEM Technical Manual
3. Browse to a suitable satellite map on your hard drive, select it and click open.
4. You will now see the satellite map in the uDig screen.
53
GISEEM Technical Manual
54
GISEEM Technical Manual
2. You will see Add Data window like this. Click on Web Feature Server and then click on
Next.
55
GISEEM Technical Manual
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.
56
GISEEM Technical Manual
5. Now the program has loaded all the Karima layers. It looks like this.
57
GISEEM Technical Manual
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.
58
GISEEM Technical Manual
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.
59
GISEEM Technical Manual
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.
60
GISEEM Technical Manual
4. Then select Table from the bottom of the page and you will see information on different
clans. Click on one of the clans.
61
GISEEM Technical Manual
6. uDig sometimes doesn’t remember to redraw the map automatically. Click on Redraw Map
button and see what happens.
62
GISEEM Technical Manual
2. You see a window like this. Click on the Color Button next to the Line text.
3. You see a Color window like this. Choose blue or some other color suitable for a river and
click Ok.
63
GISEEM Technical Manual
6. Now the rivers are blue and their names are visible.
64
GISEEM Technical Manual
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.
65
GISEEM Technical Manual
4. Now you can see information about the factory in the bottom of the page. There isn’t so
much information yet, just that it is a coffee factory.
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.
66
GISEEM Technical Manual
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!
Adding 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.
67
GISEEM Technical Manual
Creating 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.
68
GISEEM Technical Manual
5. But then again, maybe we should not add imaginary forests. Select Delete Feature tool from
the top bar.
Drawing lines:
1. Now we can use the line tool. Maybe there will be a new road in Karima forest? Let us draw
one. Select karimaroads_Type from the menu on the left.
69
GISEEM Technical Manual
3. Now you can just draw a road around the area. One click creates one more stretch of the
road. Click twice and the road will end.
70
GISEEM Technical Manual
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.
71
GISEEM Technical Manual
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.
72
GISEEM Technical Manual
5. The only school on the map should look like this now.
Create a school:
1. Now, choose Create Point Tool from the top bar 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.
73
GISEEM Technical Manual
Moving 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.
74
GISEEM Technical Manual
75