Sie sind auf Seite 1von 14

Wetland Mapping: Exercise 1 Create the NDVI Layer

ArcMap 10
Note: In the following instructions you will be asked to browse the directory location of your Wetland Mapping training folder. That location is
represented by a drive letter of x: Please note that the screen shots used in the examples were created utilizing data that was located on
C:\temp (i.e. the value of x: was C:\temp). Be sure to use the actual drive letter assigned by the computer to your flash drive and be aware that
your screens will reflect that letter and not C:\temp as in the samples. Check with your instructor for more details if you have questions.

Open ArcMap 10
First lets make sure that your default workspaces are available to you for all of these exercises.
If this step is not done, you may get errors later on because ArcGIS cannot access workspaces
properly. In the Arc Map 10 main menu bar, click on the Geoprocessing menu and in drop
down, click on the Environments button:

Click on Workspace:
Verify that the Current Workspace is your class OutputData folder and that the Scratch
Workspace is set to the ScratchArea folder in your Wetland training folder. Your screen should
look like:

Wetland Mapping, Exercise 1

July 2012

Page 1 of 14

Click OK on this window.


Now click on Geoprocessing > Geoprocessing Options

Wetland Mapping, Exercise 1

July 2012

Page 2 of 14

Verify that the Overwrite outputs entry is checked and click OK on the Options window and
youre set to go for the rest of the session.
From the main menu bar, click on the File menu and click on Open
In the Open window, browse to x:\WetlandMapping\Exercise1.mxd (where "x" is the
letter of your usb drive) and click on that icon to open the ArcMap document for this exercise.
Your screen should look something like:

Wetland Mapping, Exercise 1

July 2012

Page 3 of 14

You should see a false color infrared image of the Chanhassen study area. Notice in the ArcMap
Table of Contents that Band 4 (NIR) is assigned to the Red color, Band 3 (Red) is assigned to the
Green display color and Band 2 (Green) is assigned to the Blue display color.
In order to create an NDVI layer, we must load the Red (Layer 3) and Near InfraRed (Layer 4)
image layers separately into the ArcMap Table of Contents. We will start with the NIR Layer 4:

Click on the Add Data icon in the ArcMap standard tool bar

Browse to the raster NAIP08.img in ClassData folder of your WetlandMapping folder


and double click on the icon; You should see the following in the Add Data window:

Wetland Mapping, Exercise 1

July 2012

Page 4 of 14

While holding the Ctrl key, single click both on Band_4 and on Band_3

Release the Ctrl key and click on the Add button

Your screen should now look something like this:

Wetland Mapping, Exercise 1

July 2012

Page 5 of 14

Take some time to explore the data. If you unclick all of the layers in the Table of Contents
except Band_4, you will be seeing a black and white representation of the intensity of the
image in Near InfraRed. Notice how the lakes and waters are essentially black in NIR while they
show shades of gray in the Red (3) layer. We can now use these two new layers to do some
image algebra to create our NDVI layer.
We will use a tool in the Spatial Analyst Tool Box to create our NDVI layer. If
the ArcToolbox window is not visible, click on Geoprocessing in the main
menu and click on ArcToolbox to open it as shown on the left.

Open Spatial Analyst Tools > Map Algebra


and select Raster Calculator

Wetland Mapping, Exercise 1

July 2012

Page 6 of 14

Raster Calculator Tool

In the Output Raster window, browse to your Wetland Mapping\ScratchArea folder and enter

NDVI in the Name box.


Click on the Save button of the Output raster window. Your screen should now look like:

Wetland Mapping, Exercise 1

July 2012

Page 7 of 14

Were now ready to build the raster calculator equation that will create our NDVI layer. You
have two options to build the equation. Cut and paste or build it step by step. Choose either
way below.

Build the expression the easy way

Copy and paste the following expression into the Map Algebra expression box:
Float("NAIP08.img - Band_4" - "NAIP08.img - Band_3") / Float("NAIP08.img - Band_4" + "NAIP08.img - Band_3")

Or, if you'd like to experiment, you can build your own expression step by step:

Click in the open box for the expression building


In the Math function list, double click on Float. The word float should appear in your
expression window with opening and closing parentheses.
Browse to the NAIP08.img -Band_4 and double click on it. The name of this layer should
appear in the expression box.
Click on the Minus (-) button in the calculator operators
Then double click on the NAIP08 - Band_3 entry in Layers and variables
Click at the end of the expression once and then click on the / button
Double click on the Float math operator
Double click on NAIP08.img-Band_4 in the Layers and variables section
Click on the + button
Double click on the NAIP08.img- Band_3 in the Layers and variables section

Both techniques of entering the expression should give you a screen that looks like:

Wetland Mapping, Exercise 1

July 2012

Page 8 of 14

Click OK. The tool should run for a few minutes (and may show a status bar of 100% for many
of those minutes- it is ArcGIS after all!) Depending on the site location you may or may not get
the following window. If you do, click Close upon completion.

If the tool runs for a few seconds and says there was an error (but its not
specified), it could be because you dont have write access to the work areas on
the computer. Rerun the tool and click on the Environment button on the
bottom of the tool dialog box. Under General Settings, specify both a Current
Workspace and Scratch Workspace that is in your C:\Temp directory

Wetland Mapping, Exercise 1

July 2012

Page 9 of 14

After completion of the process, Arc Map will load your new layer to your map

Special Note: There is a reported bug in ArcMap 10 with some operating


systems that trying to divide integer rasters (like we are doing here) results in an
output raster that is all zeros. If this happens to you, dont worry about doing
the final recode steps described below. In subsequent exercises you will use a
pre-made NDVI instead of this all zero raster
Congratulations! Youve created your NDVI layer. This excerpt from the ESRI NDVI web page
(http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Using_the_NDVI_process)
talks a little bit more about the NDVI. This produces a single-band dataset, mostly representing
greenness, where any negative values are mainly generated from clouds, water, and snow, and
values near zero are mainly generated from rock and bare soil. This index outputs values
between -1.0 and 1.0. Very low values of NDVI (0.1 and below) correspond to barren areas of
rock, sand, or snow. Moderate values represent shrub and grassland (0.2 to 0.3), while high
values indicate temperate and tropical rainforests (0.6 to 0.8) (Ref:
http://earthobservatory.nasa.gov/Features/MeasuringVegetation).
We now have one final step left. Since NDVI represents essentially greenness we want to
recode our output to be a raster that will have a value of 1 where we would expect wetlands

Wetland Mapping, Exercise 1

July 2012

Page 10 of 14

(higher NDVI) and a value of 0 where we would not. Our research indicated that an NDVI value
of 0.0181 resulted in a reasonable threshold. In the next step, we will use ArcGIS to recode the
raster as 0 anywhere the NDVI <= 0.0181
Open the Spatial Analysts tool box and inside the Reclass tool set, double click on the

Reclassify tool:

Either open the Browse icon for the input raster and browse to your NDVI raster created above or
simply drag the NDVI raster layer from the ArcMap Table of Contents and drop it into the Input raster
entry in the Reclassify tool above. Your screen should look like:

Wetland Mapping, Exercise 1

July 2012

Page 11 of 14

Select all of the table entries except the first and the last two by clicking in the first column of
the table on line 2 and dragging down to the bottom (the red arrow above shows you where to
click to select a row):

Click on Delete Entries. You screen should look something like:

Wetland Mapping, Exercise 1

July 2012

Page 12 of 14

Change the ranges in the old values and the new values in the table so they look like and enter
an output file name of NDVI_R in your output folder (see figure below) but dont click OK yet:
Please make sure to check the box next to Change missing values to NoData:

Also, we want to make the output cell size be 3 meters to match our other data later, so
click on the Environments Tab at the bottom of the window and scroll down to the Raster
Analysis section. Change cell size to be As Specified Below and enter 3 into the box:

Click OK to close the Environments


Click OK to run the tool

Wetland Mapping, Exercise 1

July 2012

Page 13 of 14

The following message may or may not appear. If it does, click Close and the new layer should
display (your colors will be randomly set by ArcMap).

This concludes Exercise 1.

Wetland Mapping, Exercise 1

July 2012

Page 14 of 14

Das könnte Ihnen auch gefallen