Objectives
Know how to create composite images from Landsat image, then subset them to an area of interest.
Know how to select parametric and non-parametric training samples
Know how to perform a supervised classification of a Landsat image
Know how to reclassify a GRID image within ArcGIS
Software and Data
ArcGIS 10 with Spatial Analyst extension.
Landsat 7 - May 2003 image downloaded from GloVis( in Part 1)
Landsat 7 - April 2009 image downloaded from GloVis (see Part 1 for download instructions)
You will create composite images for each of the years and then subset each of these files to the area of the June 18, 2002 to July 7 2002 Chediski-Rodeo fire. Then, you will create a signature file followed by a supervised classification to examine the change in vegetation approximately 7 years after the fire.
Classes you will identify within each image
Burn Vegetation Water Urban
Bare Soil Basalt Flow Agriculture
Basic process you will follow
1.
Download 2009 image from GloVis.
2.
Create composite images of the 2003 and the 2009 images
3.
Subset the 2003 image and the 2009 image
4.
Create Signature file
5.
Obtain training samples from the subset03 image
6.
Save the signature file
7.
Classify both images using the signature file created based on the subset03.img file
Deliverables
An MS Word document containing .jpg versions of the map documents containing the reclassified 2003 and 2009 images. (Maps should include a legend, title, scale, source information, and direction indictor.)
Developed by the Integrated Geospatial Education and Technology Training (iGETT) project, with funding from the National Science Foundation (DUE-0703185) to the National Council for Geographic Education. Opinions expressed are those of the author and are not endorsed by NSF. Available for educational use only. See http://igett.delmar.edu
for additional remote sensing exercises and other teaching materials. Created 2009; last modified January 2012.
File management is crucial for a successful project!
Before you start compiling your data, ensure that you have become familiar with the file structure and the data used in this project. If it has not been set up for you, create the folders on the drive on which you are allowed to save data. For this project, the folder structure used is pictured below. Because this is the same folder used for the Part I activity, it includes imagery for 2003 and 2009. The 2009_Image folder is an additional folder created specifically for this activity. If you did not do Part I, then you will not have or need a folder for the 2002 image. If you do already have it, just leave it in case you want to go back to Pt
1 at a later date. Open Windows Explorer and create the necessary (or additional) folders for this activity.
Section 1: Download the Landsat Images into folder
Step 1 : If you completed Part 1 of this activity, you should already have the May 2003 image downloaded. If not, then go to Glovis.usgs.gov and download the image (L7 collection, SLC-on - 2003) for the collection/Series, Path/Row 36, 36 (When prompted to download, save as a geotiff.).
Step 2: Download the April 2009 image (L7 collection, SLC- off - 2003) for the collection/Series,
Path/Row 36, 36 (When prompted to download, save as a geotiff.).
Step 3: UnZip the files and put into the appropriate 2003 or 2009 folders.
Section II: Prepare for Analysis: Setup ArcGIS Project
Step 1 : Open ArcGIS 10. In the top part of the ArcMap Getting Started dialog box, click on My Templates and click on the
Blank Map icon to the right of the dialog box. At the bottom of the dialog box,
Click on the yellow folder to the right of
“Default Geodatabase for this map” and navigate to your wildfire folder (or class folder). Click on the New Geodatabase button to create a new Geodatabase. Name it “Wildfire2”. Click on Wildfire2 to be sure it appears as the default geodatabase.
Click Add .
Click OK to complete the creation of the new blank map with your new Wildfire geodatabase as the default geodatabase.
2
Step 2 : In the ArcMap Table of Contents
(TOC), right-Click on the Data Frame named “Layers” and create a new Group
Layer. Double-Click on New Group Layer to open the Group Layer Properties dialog box. Change the Layer Name to: MAY
2003 . Still in the Group Layer Properties,
Click on the Group tab, then the Add button. In the Add data diolog box,
Click on the Connect to Folder button:
Connect to your Wildfire folder (if you are continuing this activity directly from Part I, you may already be connected). Then, navigate to the May 2003 folder and select the Landsat image bands 2, 4 and 5 (bands ending in B20, B40, B50). If they are not in the order seen in the graphic above, reorder them using the arrow buttons on the right side of the dialog box. Click Apply when you are done.
Step 3: Following the directions in Step 2, above, create a new Group Layer named APRIL 2009 . Add the Landsat April 2009 image bands 2, 4 and 5 to this group layer. Notice the diagonal lines in the 2009 image bands. These are caused by SLC-OFF (Scan Line Corrector on sensor broke in 2003 and all data after 2003 are not corrected)
Step 4: Close the legends for all of the layers. Your Table of
Contents (TOC) should now look like the image to the right.
Step 5: Save the project in your Wildfire folder and name it
WildfirePt2.mxd
.
3
Section III: Prepare for Analysis
Create Composites for each of the Landsat image.
Of the seven Landsat bands contained in the Landsat image folder, you will use bands 2, 4 and 5 for the composites, as they are optimum for vegetation. Band 2 is useful for differentiating between types of plants, determining the health of plants, and identifying man-made features), band 4 receives reflected near infrared, and band 5 receives shortwave infrared (or mid-infrared) energy, which cannot be seen by the human eye.
Step 1: Open Arc Toolbox . Click on Data Management
Tools >> Raster >> Raster Processing >> Composite Bands.
Double-Click to open the Composite Bands tool.
For Input Rasters, Use the Input Rasters dropdown to add layers to add the April 2009 bands ending in B20, B40 and
B50 into the Composite Bands box. Be sure to add them in order, with B20 first. The order is very important.
For Output Raster: It should have already defaulted to your,
Wildfire2 geodatabase.
Change the Output Raster name to: Com2009_245 .
Click OK .
4
Step 2: Repeat Step 1 above for the May 2003 image. Name it: Com2003_245 .
When, done processing Com2003_245, the ArcMap
TOC should look like the one, below:
Examine the legend and notice the default RGB band assignments. ArcGIS automatically assigns the incoming bands to Bands 1, 2 and 3. You could change the names to reflect the actual bands, however, you will be further processing and not using this layer for the analysis. Therefore, you will leave it as is.
Create subsets of the 2003 and 2009 Composite images
Since the area of interest in the image is only the area around the wildfire and the analysis processes you will use later in the exercise require intensive computation, you will create subsets of the composite images just for the area of interest, the 2002 Chediski-Rodeo fire.
Step 1: Zoom into the lower right of the
Com2003_245 image, around the burn area, as shown to the right:
5
Step 2: On the Drawing toolbar, select the
“Draw a Rectangle” tool and draw a rectangle around the area of interest. Double-Click on the polygon graphic to bring up the properties and change the symbol to Fill Color of “No Color” with a #2 width red outline, so you can see what you have included in the rectangle. The rectangle should still be selected, as indicated by the blue “handles” around the red box.
Step 3: In the Image Analysis window, Click on Com2003_245 to select it
(it may already be selected).
With the red rectangle still selected around the image, Click on the Clip tool that is near the bottom of the Image Analysis Window, under
Processing.
Very quickly a new layer named “Clip_Com2003_245 will be added to the TOC.
In the TOC, turn off all of the layers, except for Clip_Com2003_245. You should only see this new image that is the extent of the red rectangle.
Zoom in closely, so that you are able to see individual pixels. Compare the value of a pixel in the same location for both the clipped image and the clipped image. The pixel colors may have changed a little, but the value should be exactly the same.
Zoom out to the extent of the clipped image. SAVE your project.
Step 4: Now you will subset the 2009 composite. Near the top of the Image Analysis window click the small box next to
Com2009_245 so that the image displays in ArcMap. Click on the name Com2009_245 so that it is selected.
6
Select the red rectangle, then click on the Clip tool . A new image, Clip_Com2009_245, is added to the TOC and to the Image Analysis Window. In the TOC, turn off the Com2009_245 image. You should now only see Clip_Com2003_245, which falls within the extent of the red rectangle.
Step 5: Double-Click on Clip_Com2009_245 to bring up Layer Properties. Click on the Source tab and scroll down until you are able to see the Property Status . Notice that it is Temporary . Close Layer
Properties.
Step 6: Next, you will save both of your Clipped composites as permanent layers, stored inside the geodatabase. In the TOC right-click on Clip_Com2003_245 and click on Data
Export Data. In the
Export Raster Data dialog, go with the default, Extent, Spatial Reference and Output raster settings.
Double-check that the location is our wildfire2.gdb. Change the Name to: Com2003_245_ss.
Note that the “ss” is for s ub s et. Click Save . When prompted to add the exported data to the map as a layer, click on Yes . Repeat for the 2009 image, saving it as Com2009_245_ss .
Step 7: Move the Com_2003_ss image into the MAY 2003 group layer.
Remove the other 2003 images. Move the Com_2009_ss image into the APRIL
2009 group layer. Remove the other 2009 images.
Change the band names to reflect what bands they actually are. Your TOC and layer legend band names should look like this:
Create a signature file for the 2003 Composite image subset:
In order to analyze the vegetation changes after the 2002 Chediski-Rodeo fire, you will need to classify the image using image analysis techniques to identify pixels with similar spectral signatures. There are two main types, Supervised and Unsupervised. This activity uses supervised classification, which requires that you input information about the classes before the analysis and that you select regions of interest (referred to as training samples). This means you will select samples of pixels that are representative of the spectral class that you are creating. There is as much art as there is science to this process and it takes practice and knowledge to gain expertise in doing it. Many analysts find running an unsupervised classification first can help them better choose their classes for a supervised classification. In this activity you will only run a supervised classification.
The workflow for a supervised classification, generally requires three steps:
1.
Collecting the training samples
2.
Generating a signature file
3.
Executing the classification tool
Step 1: You need to acquire several training samples for use in the supervised classification. To collect training samples, you need to find representative areas that look fairly uniform on the image. Then use a drawing tool from the image classification toolbar to enclose each sample. For this exercise, you will create 8 classes from approximately 24 training samples:
(1) Agriculture (2) Barren (3) Basalt Flow (4) Burn Area (5) Cloud Shadow (6) Forest (7) Urban
(8) Water
7
Begin by clicking on the Image Classification Toolbar Training Sample Manager Button . Note that if this toolbar is docked, it will just say “Classification”. Change the layer to Com2003_245_ss.
This will open the Training Sample Manager
Window.
Zoom (to approximately 1:24,000 scale) into a burn area (purple pixels) and use the polygon draw tool that is on the Image
Classification Toolbar to draw a sample of the area. .
When the polygon is completed a record will appear in the Training
Sample Manager Window. Click on the name to change it to Burn1.
Move to a couple of other locations on the image and create two more burn samples. Modify the colors so that each is a shade of purple. Notice that the Training Sample Manager Window will indicate how many pixels were counted in the sample.
8
Step 2: Locate urban areas, for example 34.422, -110.544 and create two samples. Locate two Forest samples and two of each of the other categories. Use the image below as a guide. You might find it helpful to find this area in Google Earth and check that what you are classifying as Urban actually is urban. This is an iterative process. Go back and forth between imagery, such as in
Google earth. When you are done, your map with the training samples should look like the one below. This one has a 70% transparency applied to more easily view the polygons
The Training Sample
Manager, should look similar to the one below.
Step 3: In the Training Sample Manager, click on the save button and save the classes as a shapefile in your project folder. If you close your project before completing this exercise, you may need to load (open) the file in order to see it displayed again.
Step 4: Because it is often difficult to get the right number of samples the first time around, it is a good idea to test out your samples to see how they look once processed and applied to the entire image. From the Classification Menu drop-down, select
Interactive Supervised Classification .
9
This creates a temporary layer that is added to the TOC. It used the samples that you selected to find all areas of the image with similar spectral signatures. Click this layer off and on and compare with the original image. You will likely find that you need to adjust some of your training samples. Delete or add additional ones until you are satisfied with the result. Time taken here can mean a better result later on, so it is worth getting it right.
Step 5: Remove the temporary interactive supervised classification layer from your project. It is a good idea to review the distribution of multiple training samples in the Histograms window to see that your samples are not significantly overlapping. You will do this with two of your samples in order to see how it works. In the Training Sample Manger window, click on a burn sample, then hold down the CTRL key and click on a forest sample. Then, click the Histograms button .
Notice that in Band_1 (actually
Band 2) and in Band 3 (actually band 5) there is good separation.
Experiment with different bands to check this out.
If you have a sample that has too much mixing in most of the bands, you might want to review one or both of the comparison samples to determine if you need to delete one of them in the
Training Sample Manager.
10
Step 6: Now you will merge all of the classes of the same type. Hold down the CTRL key while you click on all of the Burn training samples in the Training Sample Manager. Then click on the Merge button. All of the Burn samples will merge into one class. Click on the Histogram button and you will see that this class is now wide enough to include all of the former classes. Only one of the bands is shown here, but if you compare with the Band_1 in the figure above, you will notice the difference.
Repeat this process with the other classes, until you only have one class for each type (Forest, Barren etc.). In the Training Sample Manager, Save the merged training samples as TrainingSamplesMerged.shp
From the Classification menu, choose Interactive Supervised Classification to view the applied classes.
Click the resulting temporary layer on and off to compare the subsetted 2003 image. It should represent this image fairly well. If not, you may need to go back through the training samples process again to get a more representative training sample collection. Once you are done observing, remove the temporary interactive supervised classification layer from the TOC. Save your project.
Step 7: To clean up the Training Samples when you prepare to create a signature file, use the Up and
Down arrow buttons on the Training Sample Manager dialog box to organize the classes in alphabetical order.
Then rename the Class names in order to remove the “1”s in the names. For example,
Barren1 will be renamed just “Barren”. Remove the Golf Course/Lawn as these samples were quite small and were mostly captured in the Agriculture samples. When you are done, use the Reset Class Values button to assign values from 1-9, as shown in the example below. Note that your Count values will be different, since the polygons that you created for your samples are different sizes and contain a different number of pixels per sample. Save this training sample collection as “FinalTrainingSamples.shp”.
Step 8: Be sure that Com2003_245 is selected in the Classification tool bar Layer drop down window.
In the Training Sample Manager dialog box, Click on the Signature File button.
Save the signature file with the default name inside your Wildfire folder (but not inside the Wildfire.gdb).
This creates a file with a .gsg extension.
11
Section IV: Perform Supervised Classification with Maximum Likelihood Classification option.
Step 1: With the Com2003_245 image still selected in the Image Analysis window, Click on the
Classification drop down menu. Choose Maximum Likelihood Classification .
In the Maximum Likelihood Classification window:
Input raster bands: Com2003_245_ss
Input signature file: com2003_245_ss.gsg
(the file you saved earlier)
Output classified raster: MLClass_Com03
Accept defaults for the rest, then click OK .
Important : Typically you should choose a Reject Fraction to capture cells that are not close to one of the signature training samples. However, there is a registered bug as of May 2011 and even if you select a Reject Fraction it is not processed. Hopefully, this will be fixed soon. You might test it with different reject fractions to see if it is working at the time you are working on this activity.
Take a few minutes to change the colors to more closely match what you chose earlier in the training sample manager. Zoom and pan around, clicking on and off to compare with the Com2003_245_ss image.
Notice that as you zoom in, you will see single or small clusters of pixels within a larger class. These are considered “noise” and before doing further analysis, such as change detection, you must reduce the noise.
Step 2: To reduce the noise in the classified image, you will generalize the image using a Majority Filter and the
Boundary Clean Tool. Isolated regions of pixels will be removed using the Nibble tool.
Zoom into an area where there is a lot of speckling, such as that shown below. Notice that you are able to make out individual pixels.
12
Open ArcToolbox, Click on Spatial Analyst tools >> Generalization >> Majority Filter.
You will run the Majority Filter twice with two different settings. First run it as shown in the dialog box, above, using FOUR for the neighbors and a Majority replacement threshold. Name the Output raster
Majorit_MLCL1 .
Examine the results. Then, to improve the results, run the
Majority Filter again, this time with the results of the last filter, Majorit_MLCL1 .
This time choose FOUR for the neighbors and HALF from the replacement
Threshold drop down.
Compare the results of the two different filters with the classified image, MLClass_Com03 for the area that you zoomed into. Pan around and examine other areas. The majority filter must be used carefully in order to not remove essential patterns. Save the project.
Step 3: Repeat the Maximum Liklihood Classification with the 2009 (com2009_245_ss) image, using the instructions starting at Section IV, Step 1. Use the same signature file created for the 2003 image
(com2003_245_ss.gsg). Save it as MLClass_Com09 .
Step 4: Repeat the Majority Filter process from Section IV, Step 2 with the 2009 classified image, MLClass_Com09. Name the first filtered image, Majorit_MLCL1 . When you run the filter a second time on the first filtered image, name the image Majorit_Majo2 .
Step 5: Organize layers in the TOC as in the example to the right, with only the results of the last two filter techniques turned on.
Save the project.
13
Section V: Display in Layout
Step 1: In the TOC, rename Majorit_Majo1 to Supervised Classification 2003. Rename Majorit_Majo2 to
Supervised Classification 2009.
Close the Image Analysis Window.
Step 2: From the Insert menu, select Data Frame .
Name the New Data Frame 2009. Copy the April
2009 Group Layer into this 2009 data frame . Once it is copied, remove it from the Data Frame, named
Layers. Rename the Layers Data Frame to 2003.
Step 3: Symbolize the maps to match the Training Sample Manager colors you used, except use raw umber for the burn area color.
Step 4: In Layor Properties >> Symbology , Label the Classification values in the 2003 and 2009 Classification images as shown here, for the 2003 image.
Step 5: From the file menu , choose Page and Print Setup . Set the paper and map size to letter , with a Portrait orientation.
Step 6: From the View menu , select Layout View. Click on the 2003
Data Frame and adjust it to fill most of the top half of the layout page, as shown, below. Then adjust the 2009 Data Frame to fill most of the bottom half of the layout page. Set the scale to 1:482000 for each map.
Step 7: From the Insert menu, insert one of the legends into the Map Layout. Arrange as shown in this example.
Step 8: From the Insert Menu, add a Title, North
Arrow, Scale Bar, Neat Line as shown here. When completed, export the map as a PDF and insert into a
Word Document for submission.
14