Institutionen för geovetenskaper

Geoinformatiklaboratoriet

GIS Exercise

9 September 1999

Thomas Gumbricht

Patrik Stenberg

 

Introduction to vector data and topology

 

 

Requirements

The exercise requires a PC with Windows 95/98 or Windows NT, and Arc View 3.0 or later.

 

Objectives

The exercise will give an introduction to vector data structure and topology. It will also cover on screen digitising and introduce editing of attribute data, editing the legend of a map as well as creating charts and legends.

 

Task

To pass the exercise you have to create and edit spatial data and hand in a polygon “map” as specified below.

 

Introduction

 

Vector data comprise three types of data:

Points

discrete locations (wells, cities, deposits)

lines (arcs)

one dimensional structures (wires, roads, faults)

Polygons

two dimensional areas (blocks, fields, lakes)

 

Arcs have left and right hand side and thus can be part of a polygon, whereas lines lack left and right hand side and can not be part of a polygon.


Point structures

 

Start ArcView and open a new View. From the View menu choose New Theme, and select Point as the Feature type.

 

This is the Draw point tool

 

3. Press OK

 

1. Under the View menu choose New theme

 

2. Select Point as Feature type

 

 

Specify a name for the point feature and save it under your working directory. You will now have an empty theme in your view. Note the dashed line around the check box.

It indicates that you are in edit mode and that points can be added. Click on the Draw point tool  and drop some new points in the

theme, use the left mouse button. Five or six points will do fine. Stop editing under Theme in the menu bar and save the edits.

 

 

Look at the attribute data connected to the newly created theme. Either you can open the theme table by going back to the Project window, select Table as document and Add table. Or you can press the “Open theme table” button  while having the view active. Note that menu bar, buttons and tools where changed when you went from the view document to the table document.

 

Start editing and Stop Editing from the Table menu

 

Add Field under the Edit menu

 

Note that Table is the active document

 

 

As you can see the table contains no attributes, only a field defining the shape type (point). Try to press one of the records (a line is record and a column is a field), the selected record should now turn yellow and the corresponding point in the view is indicated by handles. Also try the buttons for “Select All”, “Select None” and “Switch” selection

.

 

Now we shall add a field and enter data to our point theme. Start Editing under Table in the menu bar. Under Edit in the menu bar select Add Field; and add two fields defining some wells with the following definitions:

 

Definition

Field 1

Field 2

Name

Capacity

Name

Type

Number

String

Width

5

20

 

Before you can enter data you have to click the Edit tool . The Edit tool might be difficult to see, but it is between the Pointer tool and the Information tool . When you have activated the Edit tool you can type in data in your records. To know what position you are typing for you have to have the view displayed in the background to see which of your digitised points gets handles dependent on what record you are typing in. Type the well capacity (m3 per hour) values between 1000 and 10000. When you have finished choose Stop Editing from the Table menu and save the changes. Note how the type face in the field headings of the table turns from normal to italics when you stop editing, i.e. edit mode is indicated by a normal type face.

 

 

Return to the view containing your theme. Note that there is no dashed line around the check box - the dashed line also indicates edit mode, albeit in the view.

 

Now you shall have a look at how to change colour and style of a theme displayed in the view. That is done with the help of the legend editor. To open the legend editor either double click on the legend of the theme, or activate the theme (click once on the text in the legend and the whole box gets a raised appearance) and click Edit legend under Theme in

the menu bar. Start by changing colour of the points, just double click on the coloured point under symbol. In the same menu that appears you can also change type and style of the symbol. To activate the changes you must always press Apply in the Legend editor! In the legend editor you can also classify your data and create colours or symbols representing unique values (for qualitative data) or graduated colours (for quantitative data). The field Capacity that you just created is quantitative. Open the Legend editor again and classify your data by changing Legend type from Single Symbol to graduated symbol, select the field Capacity as Classification Field and Apply, change the Size Range of the symbols and than press Apply. Move and delete points in the existing point theme by Start editing from the Theme menu - as a result the dashed line should appear around the check box and the text in the theme table becomes normal. Use the pointer tool to select a point to move or delete. If you want to delete a point simply press the DELETE key on the keyboard, to move it drag it to a new position with the mouse. Once finished Stop editing from the Theme menu and save the changes.




Line structures

 

Use the same view that contains your newly created point theme and use New Theme from the View menu to add a line theme.

 

A major difference between different vector feature types is that points have no dimension, and thus only topology (spatial relation) towards other features, whereas other features have intrinsic topology. This will become clearer after having completed this exercise. For a line (or area) to have topology nodes (a point common to two lines) must be connected, and no overshoots under undershoots should exist. To avoid overshoot or undershoot node connections and intersections must be snapped to each other.

 

 

Before digitising lines we thus need to set the snapping environment. To set the snapping environment activate the new line theme and open the Theme properties dialogue box from Theme menu, select Editing to the left and enter Snapping Tolerance to 10 for both General and Interactive.

 

Line Callout 3 (No Border): 2. Click the boxes for both general and InteractiveLine Callout 3 (No Border): 3. Fill in 10Line Callout 3 (No Border): 1. Choose Editing

 

When you get back to the view put the pointer in the active area and hold down the right mouse button, in the popup menu choose Enable Snapping (If the menu says Disable, it means that snapping is enabled).

 

In the tools menu there is a snap tool drop down menu, which can look in either of two ways,  or . Click whichever is on your tool menu and hold down the mouse button, select the . In the view click and drag a circle to represent the snap tolerance radius. A radius of 2 to 3 mm is preferable.

 

You can also enable both general and interactive snapping tolerance with the mouse when the theme is in edit mode. Put the cursor in the view and hold down the right mouse button to display the pop up menu. To set the General snapping environment, choose Enable General snapping from this menu.  Click the General Snap tool . In the view, click and drag out a circle to represent the tolerance distance. The radius of the circle is displayed in the status bar. This radius value becomes the general snap tolerance. To set the Interactive Snapping, again hold down the right mouse button in the view and select Enable Interactive snapping. Select the Interactive Snap tool  and put the cursor in the view and draw the radius for the interactive snapping tolerance. Setting the snapping tolerances with the mouse is a fast way of changing the tolerance while you are digitising.

 

A useful tool is the Show Snap Tolerance Cursor. This tool is enabled by holding down the right mouse button and selecting Show Snap Tolerance Cursor. When the tool is active, a circle appears around the cursor, indicating the snapping tolerance.

 

In the tool menu you should have a line drawing tool  where you previously had the tool for drawing a point. Click on the Line drawing tool and enter a line - single click for a vertex (that is point where the line changes direction) and double click for finishing with an endpoint. (By holding down the right mouse button you can edit the vertex while digitising). Try to digitise the endpoints of two lines close to each other (but with enough space to see that they do not match exactly, that is between 1 mm and the radius that you defined above). If correct they should automatically snap to the same position. In a similar manner do try to put the endpoint of one line close to a vertex of another. You can check with the Zoom tool whether or not the snapping worked. Hold down the right mouse button and disable the snapping environment from the drop down menu. Retry digitising two endpoints close to each other and check the results.

 

Before continuing either delete all the lines that you have created or create a new empty line theme. Set the snapping environment as before. Use the Line drawing tool  to add two lines as shown. Then open the Theme table of the new theme.

 

 

 

As can be seen from the attribute table the theme consists of two lines - that means that the lines are separate features that are unconnected (they have no common node). If the lines would have been waterpipes they would have been separate pipes without a connection and no water could flow from one pipe to other. This is called a spaghetti model in GIS jargon and is typical for many CAD drawings.

 

Delete the two lines that you have added (you have to delete both). Then redraw one of the lines with the Line drawing tool . Before drawing the next put the mouse pointer on the Line drawing tool and hold down the left mouse button (do not release it!). In the drop down menu drag the cursor to the Draw line to split feature tool . Redraw the second line and open the Theme table, now it should have four records, meaning that we have topology in our theme. Open the table and as you hold down the shift button on the keyboard, select and deselect the records to get an idea of how the topology works.

 

We will now check how consistent the topology works by adding length and address fields in the theme table. To add a field with data on lengths on each line first Start Editing (if the theme is not in edit mode) and add a numeric field called Length with at least 5 decimal places to the table. Select all with the Select all tool  

Click the Calculate button , double click the shape field and add text to the box labelled [Length] =

 

Line Callout 3 (No Border): 2. Add additional text [Shape].ReturnLengthLine Callout 3 (No Border): 1. Double click ”Shape”

[Shape].ReturnLength

 
[Length] =

 

 

 

 

 

 

 

 

 

 

The Length field will be automatically calculated. Note the values (on a piece of paper).

Then add two further fields with numeric value, and the names ”From” and ”To”. For each record give a value range and note it (or simply give the same value range for all records). For the last value to be recorded you have to hit “return” before finishing. Here is an example of how it could look.

 

 

Before adding a new line that splits any of the existing lines the rules for dividing addresses when splitting must be set.

 

Open the Theme properties editor for the lines theme. Choose Editing on the left in the editor. First we will set the rules for the Length field. Thus choose Length as Field for Attribute Updating. Select Field type to be Single and both Union rule and Split rule should be set to Shape Length, which gives values that are equal to the length of the new line.

 

Line Callout 3 (No Border): 5. Click OKLine Callout 3 (No Border): 4. select
<Shape length>
Line Callout 3 (No Border): 3. Select SingleLine Callout 3 (No Border): 2. Select Length as FieldLine Callout 3 (No Border): 1. Select Editing

 

To set the update rules for related fields open the theme properties once again, this time select Field to be From and set Range type to Continuous, which automatically should give Paired field to be To.

 

 

 

Return to your view, make sure that the Line theme is in edit mode and that you have the Draw line to split feature tool  activated. Draw a new line that crosses one (or two) of the existing lines. Open the theme table and look at the values in the fields “Length”, “From” and “To”. The values in “From” and “To” should be updated so that the values represent the positions of the new nodes

 

To reshape a line the Vertex edit tool  can be used for moving, adding or deleting line vertices.

 

To reshape a single line is strait forward

 

When the vertex tool appears as an arrowhead no vertex is close enough top be edited.

When the vertex tool turns into a cross the indicated vertex can be delete (DELETE key) or move (hold down the left mouse button and drag and release to a new position.

When the vertex tool appears as a target a new vertex can be added by a click on the left mouse button.

 

When a node common to two or more lines is edited with the Vertex tool, a ring indicates the nearest vertex on each line, and all lines are rearranged simultaneously.

 


Polygon structures

 

Actually the difference between polygons and lines is not all that large in their data structure. But lines can also be viewed as very thin and long polygons.

 

Once again create a New theme, but this time choose Feature type to be Polygon. The default drawing tool should become a rectangle, and if you click and hold down the left mouse button on the Rectangle drawing tool you should see the drop down menu as this:

 

The Rectangle drawing tool is default when your theme is a polygon

The point drawing tool is shaded and can not be activated,

and the same holds for the line drawing tools

 

The rectangle itself is a possible choice.

With the circle you can draw a perfect polygon circle.

And with the Polygon tool it is possible to draw any polygon.

The Draw line to split feature is inaccessible.

The Polygon split tool allows you to draw a line across a polygon to split it.

The AutoCompute tool is used to create a new polygon if it shares part of its boundary with existing polygons.

 

Create polygons by using the various tools, and also try the Vertex edit tool. It all works quite similar to the line feature.

 

Your turn

 

To complete the exercise you have to create a polygon that looks like the one below, including text labels. Note that the field “Area” in the table is calculated and holds true values. Different drawing tools and feature editing methods must be used to create the polygon. Snapping environment sometimes has to be both enabled and disabled to create the polygon theme shown.

 

No parts of the polygon should be overlapping! Note that the Islandquadrangle is a donut – the “island” is not a polygon – just a hole! In order to create the figure you have to look in the manual on pages 267 to 279, or open ArcView help and search for Editing polygon themes.

 

To add the area field to a polygon theme’s attribute table choose Start Editing from the Table menu. Add a numeric field called Area with at least 5 decimal, click on the name of the field to select it. Click the Calculate button and type [Shape].ReturnArea, press OK.

 

 

The labelling of the polygons should be done by using Auto-label in the Theme menu.  Set Label field to be Form.

 

 

When you have a view that you are satisfied with select Layout under View in the menu. You can create the Layout from the Project window as well, but there is a bug in choosing the layout format if you select that route. You can edit directly in the layout by using the tools in the Layout document GUI.

 

Finally we will make a chart showing the areas of the polygon features. Open the theme table, and press the “chart” button .

 

Fill in the Chart Properties, using “Area” as Field for defining the chart and Label series using the filed “Form”. You can change the style of the chart, if you want to, there are different types of charts in the toolbar, for instance to a pie

 

 

Return to the layout and add the chart to the layout. Add the chart by selecting the “Chart frame” from the Frame dropdown menu.

 

To pass this exercise you must hand this layout in to the course staff – either as a paper copy or in electronic format – your choice. It should include the polygon and its chart.

 

Remember to write your name on the map and hand it in for passing the exercise.