Institutionen för
geovetenskaper Geoinformatiklaboratoriet |
GIS Exercise 7 September 1999 |
Thomas
Gumbricht Stefan
Haglund |
SKATING ON THIN ICE
Requirements
This exercise requires a PC with Windows 95/98 or
Windows NT and the GIS software ArcView version 3.0 or later. The necessary
data area available under the catalogue
…/data/arbetsstuga2000/arcview/metria/rodakartan on the course CD or at
Geocentrum on the Earth server under earth2/_sharedfiles/geoinformatik/data/ arbetsstuga2000/arcview/metria/rodakartan. |
Objectives
The aim of this exercise is to introduce the
concept of aggregating data. In the exercise a set of data will be created
through digitising and editing in the themes attribute table. The created
table will be joined with existing tables for the presentation. |
Task
The exercise should result in a map where
points on lakes in Örebro county where ice is likely to be thin are located
and marked (digitised). The lakes where signs should be placed should be less
than 5 km from any built up area. You should create a new map that displays
the location and status of the sign and the name and size of the lakes. The
map should also display roads so workers can easily find the way to the
signs. Hand in the produced map to the teachers in
paper or digital form to pass the exercise. |
Part One – Selection Of Lakes.
Start the exercise by opening a new project. Use the Add theme button to add the themes of lakes, (rt_sj), streams (rt_vl), built up areas (Rt_to) and roads (rt_av) from …/data/arbetsstuga2000/arcview/metria/rodakartan
from either the CD or earth2/_sharedfiles/geoinformatik/data/…
When you have the themes displayed, double click on
the legend symbol of a theme to change the colours of the theme. You can also
use the Legend editor
button or choose Edit legend under the Theme menu. Roads are
usually displayed in red, streams and lakes in different shades of blue etc.
|
The decision was made to only place signs at
lakes within 5 km of built up areas. You must thus start by selecting these
lakes. To do this you must first set the map and distance units in View properties. Go to the View menu and choose View Properties. All themes are in the co-ordinate system of rikets nät that uses
meters as unit distance. Thus Set Map units to metres and Distance units to kilometres.
|
Setting distance and map units lets ArcView
know in which units to measure, and to display a scale. Look in the scale bar in the top right corner
to see in which scale your View is projected. |
Now you should select the lakes within 5 km of
any built up areas. Make the lake theme (Rt_sj)
active and under the Theme menu, find Select By Theme and choose Are Within Distance Of the selected features of
should be Rt_to and
type the distance 5000 m (or kilometres depending on your distance units).
Press New Set.
|
After you have made the selection, convert
the new selection to a shapefile, which is done
under the Theme menu, navigate to your directory and save
the file under the name sel_lakes. Add it to the
view. |
You must now find the points where streams flow
to or from lakes. This must be done manually. Thus, display the theme with the
streams and the selected lakes so you can see the intersection points. To
capture the intersection points you must create a new theme and a corresponding
table where your points (signs) will be digitised. The table should have
information about the signs such a name or code for the sign, the id code for
the lake, the name of the lake and the status of the sign.
To create the new theme, go to New Theme under the View menu and create a Point Theme. Name the new theme Signs and save it in your working
directory. Open the attribute table for the theme signs, choose start editing from the table menu and add the
following fields:
- Signnameid In this
field you choose a number or name for the sign E.g. Våtsjön or 1. If you choose
a name, the datatype should be string, and if you choose a number
the datatype should be numeric.
- Lakeid This
field should contain the id number (found in the Rt_sj92_id field in the
Sel_lakes table). This field will serve as the link to the Sel_lakes theme when you join the tables later. The data type should be numeric.
- Lakenameid This
field should contain the name of the lake and serves as the link to the Rt_text theme in the join table operation. Since it is a name, the data type
should be string. You find the name of the lake in the textsträng field.
- Status Here,
you input the (imaginary) status of the sign – “OK”, “missing”, “needs paint”,
or any other condition you could think of. The data type should be String.
Field
name |
Datatype |
Content |
Signnameid |
String or Numeric |
The name or number of the sign. |
Lakeid |
Numeric |
The number from the field Rt_sj92_id field in the theme Sel_lakes. |
Lakenameid |
String |
The name of the lake as it reads in the textsträng field in Rt_text theme. |
Status |
String |
Terms indicating status of the signs (you
make them up). |
The new table is automatically opened with two
fields, shape and id. The shape field is always
present to indicate the data type of the theme. The id field is numeric and you
must thus assign it to one of your numeric fields, i.e. Signnameid or Lakeid. You should rename the id field by making the table the active document and choose Properties.
|
By changing the name of the ID field, it will
be easier to remember which field represents the numerical id for the lake. When you have changed the name of the ID
field, you are ready to start adding the rest of the fields. |
1.
Start editing under the table menu. 2.
Under the edit menu, choose Add field. 3. In
the Field definition dialogue box, write the correct parameters for each
field.
When you have added the new fields correctly, you are
almost ready to start digitising. However, in the fields Lakeid and Lakenameid, you are later
on going to input information from the Rt_sj and Rt_text themes to link
to your new Signs theme
in the Join table
operation. You must therefore first add the Rt_text theme by using the Add theme
button and navigating to …data/arbetsstuga2000/arcview/metria/rodakartan.
When you have added the Rt_text theme you can
start digitising. Make the Signs theme the active document and if the theme is not in
edit mode (there is a dotted line around the checkbox of the theme )
choose Start Editing under
the Theme menu.
Click on the Draw point
button and place a point at an in- or outflow of a
stream.
|
To make the digitising easier, use the zoom
and pan controls to zoom in on the point you are currently digitising. |
When you have digitised a new point, you must
input the id number of the lake from the Rt_sj92_id
field in the Sel_lakes theme and the name of the lake (exactly as it reads) in
the Textsträng field of the Rt_text theme. To find the
correct number and name for the point you must make the respective themes
active and use the Identify tool on both of the themes.
|
Do the same thing with the Sel_lake theme
active. Note the number in the Rt_sj92_id field. When you have noted the name and number, make
the table for the signs theme active and use the Edit button to select the record and type in the name
and number. Finding the right point in the Rt_text theme
can be tricky, make sure it is the name of a lake you find. (Hint; lakes have
the code 3212 in the Zcol2 field.) |
For each point you digitise, you must repeat
the same procedure so this requires some work. You will probably find it easier
to identify the name and number after each point rather than digitising several
points and then try to identify their names and numbers. It might also be a
good idea to save the edits quite often. This is done under the Table menu where you choose Save edits.
Now that you have created an attribute table
for the theme signs, you shall join this table with the text (Rt_text) and lakes (Rt_sj) themes so that all the relevant information
concerning the signs is displayed in the same table.
When a table is joined to an attribute table
for a theme, all fields from the “joining” table will be transferred to the
attribute table. A join is based on the values of a field that is present in
both tables. The field name from the tables does not have to be identical, but
the data type has to be the same, e.g. numeric with numeric, string with string
but not numeric with string.
In the Attribute table to the theme signs we want to be able to
display the name and the size of the lake at which a certain sign is situated.
To do this we must join the attribute table for Signs
with the tables for text and lakes. In the table signs, the field “textsträng” should be identical to the field “Lakenameid” in the Signs table and the field “Rt_sj92_id”
should be identical to the field “Lakeid”.
First you should join the Rt_text table to the signs table. First, open the
table for Rt_text. Click on the field Textsträng. Then open the table signs and click on the field Lakenameid. Press the join button . Do
the same thing for the lake table. This time, click the
fields Rt_sj92_id and Lakeid and press the join table
button again.
2. Click on the corresponding
field (Lakenameid) in the attribute table for Signs. 3. Press the join button. 1. Click on the textsträng field
in the attribute table for Rt_text.
If this done correctly, you will now have
information from both the text and lakes themes in your attribute table for signs.
(You will see the fields and records from both joined tables in the attribute
table for signs.)
Finally make a presentation map that contains
the signs, roads and lakes. Use the signs theme to label some of the signs. The labels should show the name of the sign and
their status. The sign names should be labelled in italic and the status in normal. Due to this, you have to label the
signs twice, once for the name and once for the status.
To be able to show the names of the lakes on
the map, you can use the Label button . If
the label button is shaded it will not work and you have to designate the Signnameid field to use as the label field. To do this, you
should click the Theme Properties button and choose Text labels on
the left side of the dialogue box. When you then label, the information that
will be displayed is taken from the Signnameid field.
|
You also need to decide which position the
label should have in relation to the sign. In the Theme Properties box, click
on the Text button to the right of the centre in the Position of
text relative to label point. |
Further, the name should be in italics. This is done under the Show Symbol
Window command under the Window
menu.
|
You can decide the size and style of the
label text by opening the Show Symbol Window command under the Window menu.
When you have set the size and style to 9 and italics, go to the View and label 10-15 of the signs. |
Now that the names of
the signs are labelled, you should set another label at each of the signs you
just labelled. The new label should give information about the status of the sign.
Again, go to the Theme properties button and
choose text labels. This time set Status as the Label field. Also, in order for the two labels not to overlap you should click on
the Text box in the lower right corner of the Position of text relative to label
point figure. This way, the status of the sign will appear
just below the name of the sign in the View. Also, this time the text should
not be in italics, it should be normal, so in the Font Palette,
set style to normal. When you are finished with
the selections, use the label button to label button to label the same signs
that already have their displayed in the View.
Create a layout where the labels are present
along with the signs, selected lakes and roads. To create the layout, choose Layout under the View menu. Select Portrait and
press OK. In the layout, double-click on the title and
scalebar to edit them. You might notice that the signs
are not clearly visible in the layout. You should then change their size by
using the Legend editor in the theme. Double-click
on the symbol and use the Marker palette to
change the size. Try a few different sizes and see which one works best. You do
not have to create a new layout every time as the layout changes automatically
with the changes you make in the theme. On the next page is an example of how
the final map can look.
To pass the exercise, hand in the final map, as
described above, to the teachers in paper or digital form. To hand in the
exercise in digital format, make sure the Layout is
the active document. Go to the File menu and choose Export and under the List of File Type
drop down menu, select JPEG. Export the Layout in JPEG
format to your working directory and then send it as an attachment in an e-mail
to one of the teachers.