IPM CRSP UGANDA

GIS WORKSHOP

USING ARCVIEW

Larry Grossman

Department of Geography - Virginia Tech


Held at Makerere University, Kampala, Uganda
February 19 - 21, 2002


VIRGINIA TECH
MAKERERE UNIVERSITY
NATIONAL AGRICULTURAL RESEARCH ORGANIZATION


NOTE: The materials on these pages--in printed and digital form and on the World Wide Web--are to be used only in association with the Virginia Tech IPM CRSP. Reproduction or use of these pages, in part or in full, for commercial purposes is strictly prohibited. Those wishing to reproduce or use these pages for non-profit, educational purposes should contact the author at LGROSSMN@VT.EDU for permission.


Acknowledgments: The digital data in these GIS lessons are supplied by the Institute for Environment and Natural Resources, Makerere University, Uganda; the National Environmental Management Agency (NEMA), Kampala, Uganda; the National Biomass Project, Department of Forestry, Kampala, Uganda; the World Resources Institute (African Data Sampler), New York; the Blackland Research and Extension Center and the Department of Rangeland Ecology & Management, Texas A & M University (Almanac Characterization Tool); and the United Nations.

Step 15: Advanced Features in ArcView

ArcView has a wide range of features to help display and analyze data. In this final lesson, we will explore a few advanced features that will be useful in the examination of agriculturally related variables.

Drawing Themes in ArcView

You can draw points, lines, and polygons in ArcView, create attribute data for the themes that you draw, and save them as separate themes.

Such themes are very useful for adding new information to your map or for creating features to display values at particular places.

Let us add a few points to a map and then add attribute data to the new point theme's table.

Make sure that our theme "District Names" is still displayed and active.

We are going to add point data on corn borer counts on top of our theme of districts.

Select from the menu at the top of the screen View and then New Theme from the drop-down list.

The New Theme window appears, asking you to select which "Feature Type" you want to create--point, line, or polygon--from a drop-down list.

Select Point and click on the OK button.

The New Theme dialog box appears, requesting the file name for your new theme and which directory to use to store the theme. Use the file name "corn_borer.shp" and place it in the "ipm-crsp" directory.

Click on the OK button and notice that the small box next to the new theme name "Corn_borer.shp" in the Table of Contents has a thin dashed line around it. The dashed line means that you are in "edit mode" for that theme.

Note that even though the box next to the theme name has a check in it, no data associated with it appear on the map because the theme now is empty. ArcView wants us to create the points and associated attribute data that will be stored in the theme.

Click on the Draw Point button in the second row of buttons at the top of the screen.

Your cursor changes to a cross-hairs. Click once in a district on the map, as I have done in the map below. Notice that a point appears with handles around it.

Click on nine other places to establish points there.

Click on the pointer arrow in the second row of buttons on the far left at the top of the screen.

Then click once on the map to remove the handles.

Now click on the Open Theme Table button in the top row of buttons at the top of the screen. Notice that there is only one field--"Shape"--in the table "Attributes of Corn_borer.shp".

If you click on Table in the menu at the top of the screen, you see the choice, Stop Editing in the drop-down list, which means that we are already in "Editing mode."

Thus, unlike before, we do not have to select "Start Editing" to make changes or additions to the table.

Go ahead and add a field (select Edit and then Add Field from the drop-down list) and name it "CornB_num" (which stands for the number of corn borers). Be sure that in the Field Definition dialog box that the "Type" is "Number."

Click on the OK button to add the field.

Click on the Edit button in the second row of buttons at the top of the screen.

Now you can add numbers to the table. Enter numbers between 10 and 100 to your table for each row in our new field. Be sure to press the Enter key after each entry as well as after your last entry.

We can add any number of fields to this new table, but we will only create this one field here. (We could also add data in the form of "categories" if, when adding a new field, we select for "Type" the choice "String" in the Field Definition dialog box.)

Select Table from the menu at the top of the screen and Stop Editing from the drop-down list. Respond Yes when queried if you want to "Save Edits?".

Close the table and double-click on the theme name "Corn_borer.shp" in the Table of Contents to bring up the Legend Editor dialog box.

Select "Graduated Symbol" for "Legend Type" and "CornB_num" for the "Classification Field" and then click on the Apply button and close the Legend Editor dialog box.

The values for our new field on corn borer counts are now illustrated by the graduated symbols on our map.

Thus, we can map new points that we create and assign values to them.

In other cases, such points could represent pest traps in a parcel of land or households in a parish. A major advantage of creating such themes is that you could have several data points (such as different pest traps) in the same polygon.

You can then analyze the spatial distribution of the values of your new theme in relation to other themes, such as elevation, rainfall, and soil type.

In addition, you can draw lines and polygons to create new themes in the same manner.

Spatial Joins

Another very useful technique is performing a Spatial Join. Spatial joining allows you to combine two different themes--one a point theme and the other a polygon theme--to determine the relationship of the data in the point theme to those in the polygon theme.

Uncheck the boxes next to the themes "District Names" and "Corn_borer.shp" in the Table of Contents so that they are no longer displayed in our View.

Add the theme "Shamba_soil.shp", which has information on the three soil types in the area where we examined the parcels of land.

Display the theme, make it active, and zoom to the active theme. Display the theme with a "Unique Value" legend type using the field "Type."

We want to determine the number of pests (from the theme "Pests1.shp") found in each soil type.

Drag the theme "Pests1.shp" to the top of the Table of Contents so that it is above the theme "Shamba_soil.shp". Display it in our View. Your map should look like this:

We have many pest-count points but only three soil types. A spatial join will determine the total number of pests in each soil type.

We need to combine the tables of the two themes to perform the spatial join.

To perform the spatial join, first open the table for the polygon theme "Shamba_soil.shp" and click on the field name Shape.

(Note: to make the important contents of this attributes table easier to see, I have hidden from view some of the fields in "Shamba_soil.shp".)

Now open the table for the point theme "Pests1.shp" and also click on the first field name Shape as well.

(Note: You should open the polygon theme first and the point theme second to perform the spatial join, as we did here.)

Click on the Join button.

The data from our two tables are now merged in the table "Attributes of Pests1.shp." (Remember that some of the fields from "Shamba_soil.shp" are hidden from view in the following picture, but you will see them in your table.)

Note that for each record in our table that the soil type is now specified. Click on the field name "Type" so that its cell appears darker.

By selecting this field, we can summarize the pest count data according to the soil type.

Click on the Summarize button in the top row of buttons.

In the Summary Table Definition dialog box , under "Field" select "Pestcount1" from the drop-down list. Under "Summarize by" select "Sum." Click on the Add button and the category "Sum_Pestcount1" will appear in the empty box on the right.

Click on the OK button. The results now appear in a new summary table.

Now we know the total number of pests (in the field "Sum_Pestcount1") as well as the number of pest-count traps (in the field "Count") in each soil type.

Thus, we can combine data in two different themes to examine their relations.

Close the summary table "sum2.dbf" and the table "Attributes of Pests1.shp."

Hot Links

Hot links enable us to display images from external sources on our hard drive so that they are associated with particular features on our map. We can display any type of image, such as a picture of a chart, crops, a soil profile, or insect. Such hot links can be very useful for providing additional information and for visualizing patterns or problems.

We are going to add a hot link to the bottom left point in the theme "Pests1.shp." Make sure that the theme is active. Select this point so that it appears yellow on our map.

Then open up the attributes table for "Pests1.shp". Add a new field. (Be sure to "start editing" first). In the Field Definition dialog box, the "Name" of the new field should be "Image" and be sure that its "Width" specified in the Field Definition dialog box is wide enough to contain the entire address of the external image that will be linked to this point (I set the width at 40 in this case). Also, be sure to set the "Type" as a String because we are typing in a category (the address of the image on your hard drive), not a number.

Click on the OK button.

The table should look like this, with the new field added on the far right of the table:

To find the highlighted row linked to the selected point in our map, click on the Promote button at the top of the screen below the menu.

Click on the Edit button in the second row of buttons at the top of the screen so that you can begin typing in the table.

We need to type in the "address" for the image that will be the hot link to our selected point. We want as our hot link the image file "u-bug.bmp", which is located in the "ipm-crsp" directory. Thus, its address on your computer is:

C:\ipm-crsp\u-bug.bmp
Type in this address in the field "Image" in the highlighted row and press the Enter key.

Close the table.

In our View, open up the Theme Properties dialog box. On the left hand side of the dialog box, scroll down to the Hot Link icon and click on it.

In the drop-down list for "Field", select "Image", which has our address of the image.

For the drop-down list for "Predefined Action", select "Link to Image File."

Click on the OK button.

Click on the Hot Link button in the second row of buttons at the top of the screen.

When you move your cursor over the map, its shape looks like a bolt of lightning. Click once on the point highlighted in yellow to bring up the hot-linked image of the insect pest.

We could also have as our hot links pictures of crops infested by insects or of charts displaying some information of importance. Similarly, we could have two themes representing the same parcel at two different points in time and have a hot link for each one to see what the condition of the parcel was like at the two different points in time.

The End... and the Beginning

You have just started to explore the many possibilities in GIS. As we have seen, ArcView is very useful for storing, manipulating, displaying, and analyzing data and in helping us to formulate hypotheses about spatial relationships.

Also, we have only examined the basic ArcView software package. There are more advanced modules available to allow you to perform much more complex analyses.

I hope that this workshop has stimulated your interest in using GIS to enhance your research.

Good luck!

Larry Grossman February 2002

[Return to beginning]