USING ARCVIEW

IPM CRSP

VIRGINIA TECH - CARDI JAMAICA

INFORMATION SYSTEMS FOR COLLABORATIVE RESEARCH

GIS WORKSHOP

August 18 - 20, 1998

Larry Grossman

Department of Geography

Virginia Tech


NOTE: The materials on these pages--both in printed 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.


Acknowledgment: All coverages and part of the data in these GIS lessons are supplied by Glynis Ford of the Rural Physical Planning Division (RPPD), Ministry of Agriculture, Jamaica.

Step 10: Spatial Analysis II: Finding Data that Meet Spatial Criteria--the Role of Distance

Another typical GIS task is to find places that meet certain spatial criteria, such as being located within a certain distance of another geographic feature or intersecting with another geographic feature.

Distance is a crucial variable in IPM because the spread of pests over time may be distance-dependent and the influence of environmental factors on pest populations may also be distance-dependent. Similarly, distance is important in a wide range of other agricultural variables. For example, the number of livestock raised may be affected by distance to water supplies and the types of crops grown may be affected by distance to roads and markets.

Setting the Scale in ArcView

Before using distance-related tools, we need to be sure that we have set the units to be used for measuring distance. To do so, click on View in the menu at the top of the screen and select Properties from the drop-down list.

This brings up the View Properties dialog box.

Notice that in the middle of this dialog box there are two drop-down lists for "Map Units" (coordinate units) and "Distance Units."

"Map units" are determined when the map was originally created, but you need to make sure that they are entered correctly in the "Map Units" box here. For all the maps in our exercises, "Map Units" should be set to "feet." If you do not have "feet" selected in the "Map Units" box, select that choice from the drop-down list.

You can select the "Distance Units" that will be used to illustrate measurements on your map. For example, do you want your distance measurements in feet, miles, kilometers, etc.? The appropriate Distance Units chosen will depend upon the map's scale. The choices are illustrated below.

I have chosen "feet."

Examining the Influence of Distance

When using our distance tools, we can employ them for examining themes that are points, lines, and polygons.

For our example, we want to determine how Number of Pests are influenced by distance from rivers and whether the influence of distance varies by major crop type.

First, change our theme from "Leps Count" by double-clicking on the theme name and changing the Classification Field in the Legend Editor dialog box to "Crop1" and display it on the map. Change the name of the theme in the Table of Contents to "Major Crop."

Click on the box next to the theme name "Number of Pests" to display it on our map. You need to scroll to the top of the Table of Contents to find the theme name. Our map should look like this.

We are interested in selecting those pest-count points on our map that are within a certain distance from rivers. Thus, the theme "Number of Pests" must be active, as it is in our view.

Select from the menu at the top of the screen the category THEME and select in that drop-down list "Select by Theme..." near the bottom of the list.

theme menu

The Select by Theme dialog box now appears.

Note that there are two drop-down lists under the headings "Select features of active themes that" and "the selected features of."

First, go to the second drop-down list "the selected features of" and choose Jarivers. This indicates that distances will be measured from where the rivers are located.

Now look at the first drop-down list, "Select features of active themes that". From this list, choose Are Within Distance of. Because "Number of Pests" is the active theme, ArcView will find the points of this theme that are within a certain distance of the rivers.

(Note: depending on the themes chosen, the "Select features of active themes that" drop-down list can have numerous possibilities:

But we are only going to use two of them in this lesson.)

The dialog box should now look like this.

Note also that a new category has appeared at the bottom of the dialog box, "Selection distance." This is where we enter the distance that we want to specify. Erase the zero and type in 200 because we want to select all points with pest-count data that are within 200 feet of a river.

Now click the "New Set" button at the right of the dialog box. The points that are within 200 feet of a river will be selected and appear in yellow on the map. By default, ArcView represents selected features by depicting them in yellow.

Note that the color representing "callaloo" is too similar to the yellow points so I changed the color representing callaloo to a different color to improve the contrast.

Does the 200-foot distance from rivers have an impact on pest populations and does the influence vary by crop type? We could also change the distance examined to see if shorter or longer distances appeared significant. Note the variation in Number of Pests in sweet potato gardens at distances farther than 200 feet. We could also use the identify tool to examine the characteristics of plots that appeared to vary from our expectations and use the query builder to test hypotheses about the variations.

Also, we could change the theme "Major crop" to display other themes we have, such as pesticides used, head of household, types of IPM strategies used, etc., to see how they relate spatially to the features selected.

We could examine other issues using this method. For example, we could compare the number of male and female-headed households a certain distance from roads or the impact of distance from roads on agricultural productivity.

To remove the color yellow from the selected points, first be sure that the theme "Number of Pests" is active. Then click on the Clear Selected Features button from the top row of buttons on the right at the top of the screen below the menu.

Selecting Features and Converting them to Shapefiles

You can also select a subset of certain individual features (of points, polygons, or lines) of interest from a theme and take measurements only from them. For example, let us say that we want to find all garden tracts (polygons) a certain distance from the banana fields (also polygons).(Note that in this case we are examining distance from polygons to other polygons, but we could also examine distances to points and lines as well.)

We first have to click on the Select Feature button located on the second row of buttons at the top. This allows us to select--and highlight in yellow--features of interest. Before selecting a feature, be sure that it is active; thus, make the theme "Major Crop" active. You select a feature by clicking on it once with your cursor; when you select it, it turns yellow. To select more than one feature on your map, you press down the Shift key while making your selections.

Go ahead and select the banana gardens, as I have done.

Then go to the menu at the top and click on "Theme" and select "Convert to Shapefile" from the drop-down list.

By converting the selected polygons to a shapefile, we can create a new theme from them and add the theme to our Table of Contents and then take measurements from the features in our new theme.

The Convert window appears. Here you are asked to give the theme a name and to place it in the directory that you select. We will change the theme name to "Banana.shp".

After placing the "Banana.shp" file in the directory of your choice on the right side of the Convert window, click on the OK button.

A window will appear asking if you want to "Add shapefile as theme to the view?"

Select Yes. Our new theme name, "Banana.shp", now appears in the Table of Contents. (You may need to scroll up in the Table of Contents to see the new theme name.)

Make the theme, "Major Crop" active. Then, click on the Clear Selected Features button to remove the yellow highlighting around the banana gardens and click on the box to the left of the theme name "Banana.shp" so that it appears on the map.

The theme "Major Crop" is active because we are interested in finding tracts in this theme a certain distance from the new polygon theme we just created, "Bananas.shp."

In the Select by Theme dialog box, select "banana.shp" in the box for "the selected features of" and "Are within distance of" in the box for "Select features of active themes that". For "Selection distance" enter 200.

Click on "New Set" in the dialog box and the gardens whose closest boundaries are within 200 feet of the banana gardens are now selected.

Does the distance that we specified appear to have an influence on the number of pests appearing in the garden plots that we just selected? We can also examine the particular characteristics of the garden plots selected and compare them with garden plots farther away. We could also convert them into a separate shapefile as well, if necessary. Anything that is selected can be turned into a shapefile.

Note: There are other methods of selecting features for analysis. (To save time in the workshop, just watch what I am doing; this part on selecting is for future reference.)

One is to use the query-builder button located in the top row of buttons at the top of the screen (in this picture, the one on the far right). Previously, we used the query-builder button located in the Theme Properties dialog box, which enabled us to portray on our map only those items we specified. In contrast, the query-builder button in the top row of buttons selects features (makes them appear yellow) that match the criteria that we specify while allowing the other features to also remain on the map unselected. Using the query builder in such cases allows you to create a shapefile from the selected material.

Another method is to click on the Select Feature button and draw a rectangle on your map by dragging your cursor to enclose the area of interest; ArcView will then select any feature in the active theme whose boundary touches the rectangle you created or is within that rectangle.

You can also select features by drawing shapes on our map. Press (not click) on the Draw Point button in the second row of buttons at the top of the screen and select the shape that you want to draw. Here I will draw a line on "Bpkcrops.shp" by selecting the line-drawing button from the drop-down-list.

Then drag your cursor to create the line. Release it when finished.

Click on the Select Features Using Graphic button in the top row of buttons; this button enables you to use the graphics that you create to select areas for analysis. ArcView will then highlight all features (in this case polygons, but they could also be points and lines) intersected by the line.

Similarly, if you drew a circle, it would highlight in yellow all features touching and within the circle if you also used the Select Features Using Graphic button.

Now remove the yellow highlighting by clicking on the Clear Selected Features button.

Finding Features Adjacent to Other Features

You can also select all the polygons that are adjacent to [share the same boundary with] another polygon or line. In this case, we want to identify all the garden tracts illustrated for the theme "Major Crop" that are adjacent to the rivers.

Before doing so, click on the box next to the theme name "Banana.shp" so that it is no longer drawn on our map. Then make sure that the theme "Major Crop" is active and click on the "Clear Selected Features" button at the top of the screen below the menu to remove the yellow highlighting.

As before, select "Theme" from the menu at the top and choose "Select by Theme" from the drop-down list. In the Select by Theme dialog box, select "Jarivers" for "the selected features of" and "Intersect" for the "Select features of active themes that" drop-down list.

Note that there is no box for specifying distance because we are focusing on features that are next to each other.

Click on the "New Set" button and our map will highlight in yellow all gardens adjacent to rivers.

We could then examine their agricultural characteristics and compare them with gardens farther away. We could also create a new shapefile from the gardens selected. Also, if we were examining the impact of roads on agricultural production, we could select all gardens that are adjacent to roads in the same manner.

Click on the Clear Selected Features button to remove the yellow highlighting.

Other Methods of Determining Distance

There are other methods that we can use to find locations within a certain distance of a theme's features, especially those represented by a point. I have selected a point from the theme "Number of Pests" in the middle that is highlighted in yellow, from which I will measure distance. (Be sure that the theme is active before doing so.) Select the same point.

Press (not just a click) on the Draw Point button Draw point button on the far right of the second row of buttons at the top of the window. (Note: you may see the Draw Line icon in the same place if you performed the optional tasks described above for "other methods of selecting features." In that case, select that button instead.) A drop-down list of icons will appear.

drop-down icons

Click on the icon near the middle that looks like a circle.

Then move your cursor to the highlighted point. Notice that the cursor changes to "cross-hairs" when moved over the map.

Place the cursor exactly on top of the yellow point and drag it outwards slowly. Notice that the status bar at the bottom of the window indicates the length of the radius of the circle that we are drawing.

When the radius reaches 400 feet, release the cursor and the circle will remain on the map, with four square colored "handles" outside its border.

(Note: the circle here will have a thicker boundary than on your screen because I modified its width by using the "Outline" drop-down box in the "Fill Palette" window.)

We can then examine the characteristics of the plots within the distance that we have chosen.

(Note that we can also select all the features within the circle and those touching its boundary by clicking on the Select Features Using Graphic button and then convert it to a shapefile.)

Now click on the pointer arrow button in the second row of buttons on the left at the top of the screen and click on the map to remove the four handles around the circle.

(Note: To later delete a circle from the map (or any other graphic that you create, such as a line or polygon), it has to be "selected." It is selected when the four "handles" appear outside the edge of the circle (as they do in the map above). If the handles do not appear, click on the pointer arrow button and then click on once on the edge of the circle and the handles will appear. Then click on Edit from the menu at the top of the screen and select Delete Graphics from the drop-down list. This will delete the circle.)

There is one more distance tool in ArcView that is sometimes useful. Click on the Measure button in the second row of buttons at the top of the screen.

When you place you cursor on the map, it changes to a cross-hairs with a ruler. Place your cursor on the highlighted yellow point and drag it out to the far boundary of the banana gardens. As you do so, the distance measured (approximately 960 feet) appears in the status bar at the bottom left of the screen.

Double-click on the screen to remove the distance-measuring line.

Now, click on the Pointer arrow button in the second row of buttons at the top of the screen below the menu and click once on the edge of the circle on our map so that the four "handles" appear around the circle. Then click on Edit from the menu at the top of the screen and select Delete Graphics from the drop-down list. This will delete the circle.

Now make the theme "Number of Pests" active and click on the Clear Selected Features button in the top row of buttons so that the point that we previously selected is no longer selected.

[Return to beginning]

[GO TO STEP 11]