GIS and Environmental Health

Exercise 8:  Spatial Modeling Lab

Goal:  In the remote sensing labs we discussed the classification of satellite images.  Satellite images are raster datasets, in which the data is presented as a matrix of pixels.  In this exercise, you will explore some of the raster tools available in ArcGIS.  In particular, you will use the Spatial Analyst extension, an add-on extension to ArcGIS that allows you to manipulate raster data.  We will consider the problem of West Nile Virus.

Context: West Nile Virus is a mosquito-borne disease that causes encephalitis.  The first case of West Nile Virus in North America occurred in 1999.  Subsequently, in 2000, eighteen human cases were documented in the eastern United States.  Mosquitoes infected with the virus were found in 38 counties on the east coast, though test samples were obtained from many other counties in the east.  In this exercise, we will use remote sensing data to explore what type of land use and land cover is associated with these infected mosquito areas, and to see if there is any discernable difference in land-use from non-infected mosquito areas.

 

STEP 1

Download the following datasets to your computer (create a N:\GeogHealth\<your name> directory):

    Land cover and land use map, classified from remote sensing data by the USGS [ wnvgrid.zip]
    County Boundary shapefile for a small area of the East Coast [ countydata.zip]

You will need to uncompress the files with Winzip.

The countydata shapefile has an attribute table with a field called "isPositive" that takes on the following values:
    0 = no reports or not participating
   -1 = test sample submitted, but no positive mosquito infection
    1 = positive mosquito infection found

The wnvgrid is raster data in ESRI grid format, which is the native raster format for ArcGIS.  Each pixel in the wnvgrid land cover land use map is encoded with a value.  These values correspond to the following types of land cover and land use:

Value

Description

1

Urban and Built-Up Land

2

Dryland Cropland and Pasture

3

Irrigated Cropland and Pasture

4

Mixed Dryland/Irrigated Cropland and Pasture

5

Cropland/Grassland Mosaic

6

Cropland/Woodland Mosaic

7

Grassland

8

Shrubland

9

Mixed Shrubland/Grassland

10

Savanna

11

Deciduous Broadleaf Forest

12

Deciduous Needleleaf Forest

13

Evergreen Broadleaf Forest

14

Evergreen Needleleaf Forest

15

Mixed Forest

16

Water Bodies

17

Herbaceous Wetland

18

Wooded Wetland

19

Barren or Sparsely Vegetated

20

Herbaceous Tundra

21

Wooded Tundra

22

Mixed Tundra

23

Bare Ground Tundra

24

Snow or Ice

 

STEP 2

Start ArcGIS - ArcCatalog.

From the ArcCatalog menu, select File-Connect Folder.  Select the directory where you stored the shapefiles you downloaded.

Start ArcGIS - ArcMap,  Drag the two files, "wnvgrid" and "countydata" to the table of contents.

 

STEP 3

Create a thematic map for the county mosquito data.  To do this, right-click the "countydata" layer, select "properties".  In the properties window, select the "symbology" tab, and then create a thematic map showing the infected and non-infected mosquito counties by choosing "categories", "unique values".  Where it asks for a Value Field, select "isPositive".  Then press "add all values", followed by the OK button.

You should now be able to see which counties reported positive mosquito infection.

 

STEP 4

Turn on Spatial Analyst.  What we will attempt to do is clip the land cover raster to the positive infection counties and then compute the area for each type of land cover associated with just these counties.  Then we will repeat the process for the non-infected counties, and compare the two sets of area statistics.

This requires us to use an ArcGIS add-on program called the Spatial Analyst extension.  Right-click on the main menu bar (ie. the menu that has "File, Edit, View,..."), and select "Spatial Analyst" to show the menu specific to the Spatial Analyst.  Next we must activate the Spatial Analyst extension.  From the main menu bar select "Tools", Extensions".  Then put a check mark by the "Spatial Analyst", followed by pressing the "Close" button. 

The extension is now ready for us to use.

 

STEP 5

First we will need to convert the wnvgrid from its grid format to a shapefile format.  That's because the clip tools will only work with shapefiles.

From the Spatial Analyst menu, press "Spatial Analyst", and select "convert", "raster to features". 

Input raster is "wnvgrid", Field is "value", output geometry is "Polygon", put a checkmark by "generalize lines".  Where it says "output features:", press the folder icon to the right, navigate to your directory on the D drive, and save the output to a file called "wnvshape".

Press OK to convert the grid to a shapefile.

After the conversion finishes you should see that a new layer "wnvshape" is added to the table of contents.  This shapefile has an attribute table with a field called GRIDCODE that contains the land cover encoding for each polygon.

 

STEP 6

In preparation for the clip operation, let's select just the positive infected counties.  From the main menu select "selection", "select by attributes".

In the select by attributes window, layer should be "countydata", method is "create a new selection", then construct the following equation by clicking on the different fields and values (you can also just type this into the SELECT * FROM... window):

    "isPositive" = 1

Then press "Apply", followed by the "Close" button.

You should now see that the positive infected counties have been selected on the map.

 

STEP 7

Let's do the clip operation now.  The clip operation will cut out the land cover for just the selected counties.

- If you are using ArcGIS9.1, open ArcToolbox, “Analysis Tools”, under “Extract”, there is a “Clip” function.

- If you are using ArcGIS8.0, from the main menu bar, select "Tools", "Geoprocessing Wizard".

In the wizard, select "Clip one layer based on another".  Press "Next" to go to the next step of the wizard.

The input layer should be "wnvshape".  Polygon clip layer should be "countydata".  Save the output to your directory as "wnvinfected".  The default option is to use selected feature and we already selected the positive infected counties in the last step.   Press "Finish" to start the clip process (it may take a couple minutes to finish).

When it finishes, you should find a new wnvinfected layer in the table of contents.  wnvinfected contains the land cover for just the infected counties.

 

STEP 8

Let's now compute the area associated with each of the land covers in the infected counties.

Right-click on the wnvinfected layer and select "open attribute table".  Press "Options", "Add field".  Name is "Area", Type is "Double", precision is "15", and scale is "2" (precision means 15 digits, scale means 2 decimal places").  Then press OK to add the new field that will hold the result of the area calculation.

Right-click on the heading of the new Area field, where it says "Area".   Then select "Calculate values".  Press "Yes" at the field calculator warning.  Check the Advanced box then enter the following equation into the field calculator to compute area (you can copy and paste it from this webpage). Below where it says "Area=", type in dblArea.  Press OK when done.

Dim dblArea as double
Dim pArea as IArea
Set pArea = [shape]
dblArea = pArea.area
 

After it finishes running, notice that the areas have been calculated and entered into the Area field.

Now, right-click on the GRIDCODE heading, and select "Summarize".  In the summarize window, place a checkmark by Sum for Area.  This will create a new table that summarizes the area for each unique land cover for the positive infection counties.  By checking sum, you are specifying that it should sum up the areas for all the polygons that have the same GRIDCODE (land cover code).  Press OK to do the summarization.

You should find that a new table is added to the table of contents.   Right-click on it and select "open" to view the table.  The table shows the area of each land cover associated with positive infection counties.

 

STEP 9

Repeat steps 6 through 8, but this time for non-infected counties.   (ie. use  "isPositive" = -1  to select non-infected counties)

Compare the area results for infected vs non-infected counties.  Any notable differences in land cover?  Do you think these differences could be used to predict the geographic range of West Nile Virus infected mosquitoes?

 

 Congratulations you are all done!  Enjoy the weekend!