Supervised Classification in ER Mapper

Make sure that you copy the data to your Q: directory before you begin this process. The reason for doing this is that when you complete this process you change the "header" file (the .ers file)

Here are the steps for classification using the raw TM data bands.

  1. Start ER Mapper and open a new RGB algorithm. Load the data and make it RGB321 and save it as an algorithm named data_name_here_RGB321.alg in your Q: directory.
  2. All classification depends on the distribution of the cell data so if you haven't done so yet, you must first calculate the statistics. To do this, choose Calculate Statisitcs from the Process Menu. When you get the options box, set the resampling to 1 through 4, and click the "force recalculation" button. Then click ok and wait.
  3. Getting ready to draw the training regions. What you're doing is make a new annotation layer first that shows vector outlines. This vector outline is used to make a new set of rasterized regions that define the cells of your training region. This is a several step process
    1. From the Edit Menu choose the Edit/ Create Regions option.
    2. Two boxes will come open. One is for the New Map Composition, make sure that it refers to the correct dataset (on whose header file you want to right this information; remember that it is easily transferred another dataset sharing the same geometry.)
    3. Click ok when you're done and you should see the second new window with a toolbar. You'll also get a new layer in your algorithm.
    4. Save As...this algorithm using the main ER Mapper menu (not the new tools menu) using a name such as "small_Va_RGB321_with_landuse"
  4. Drawing the training regions
    1. Open the Geoposition tool under the View menu.
    2. Using the zoom and pan buttons, zoom in on BV.
    3. From the tools menu, choose the polygon tool it looks like this.
    4. Outline the residential part of BV and double-click on the last point to close the area.
    5. Double-click on the polygon tool and an options box will come open. Use it to set color.. of the line (and enclosed region). From the View menu of this set color box you can choose the "named colors" option, it's easier to use. Click ok when you've got a color you like.
    6. Now click on the text/attribute button
      (this one)

      and give this region a name. If you want to outline other areas of the same type, just outline them later and use exactly the same name. It is better to have more than one training region for each feature class.
    7. From the tools palette choose the save as... button. Make sure that it is saving the information to the correct dataset. This will add the region definition information. I recommend that you click on the save button of the tools menu after working with each region outline.
    8. Zoom out using the All datasets button on the geoposition menu box and then zoom in on a area of pasture.

      Repeat 4.I to 4.VII the zoom out again. Find the lynchburg reservoir.... etc.
  5. Evaluating your training regions
    1. Make sure that you have both saved the region annotation to your dataset (using the tools palette) and save the algorithm using the main ER Mapper save button. To either view the raw statistics or the histograms, I refer you to the tutorial manuals. The following instructions apply only to the scattergram method.
    2. From the View Menu, choose the scattergram option. It may ask you to confirm some setup information. click ok. You should see a density plot of band 1 vs band 2 data. To see how good your training regions are, open the setup box and click on the "show means and 95 confidence intervals near the bottom AND open the dataset to which you just attached the raster regions, with the open dialog box at the bottom.
    3. All of your training regions, in appropirate colors, should appear as "x's" with elipses around them. Change bands in the setup box and use the "limits to actual" button to zoom in. If you don't like some of your training regions you can delete them using the "scissors" keys in the tools palette (click on them first).
  6. Classifying the data based on your training regions.
    1. From the Process Menu choose Classification then Supervised Classification.
    2. Select the Output Dataset option and enter a name like 1999_sup_class_max_like. Make sure that it goes into your home directory.
    3. Click the classification type drop-down menu and choose Maximum Likelihood then Maximum Likelihood Standard
    4. When the setup box opens, un-select the typicality and posterior probability options. They add a lot of time to the processing and space to the dataset.
    5. Click ok and wait.
  7. Viewing the classified image.
    1. Open a RGB image of your dataset, and then add a "New Surface" from the Edit button.
    2. Change the new pseudocolor layer type to "class display."
    3. From the process stream at the bottom, load in your newly created classified dataset and hit refresh button.
    4. If you don't like the colors, choose the Edit Class/Region Color and Name option from the Edit Menu.
  8. Subsetting the classified image.
    If you want to display a map with just one or more of the classification layers, but not all follow these steps.
    1. Close all the windows and open a new Pseudocolor algorithm.
    2. Change the layer type to Classification.
    3. Load your new classified dataset into the algorithm.
    4. From the process stream, choose the equation editor and enter the following equation if you want to display class number 1
      if input1=1 then 1 else null
      or...input1=2, etc for other classes and then click the apply button and the GO button.
    5. From the process stream change the color.
    6. You may add as many classification layers as you wish, and you may display them over a RGB image if you want.

Classifying data other than raw TM bands

  1. First make an algorithm using RGB or any number of pseudocolor layers that contains ratios or principal components.
  2. Save the algorithm. Then Save As A Virtual Dataset using a good name that tells you what is there plus the word "virtual." This makes a new dataset header (with the .ers ending) that makes use of other raw data and the algorithm as if it were a dataset.
  3. Run statistics on the new dataset using the Process menu and Calculate Statisitcs options
  4. Add the old training layers to the new dataset by opening up a new annotation layer (edit/create regions under the Edit Menu), loading the previous training regions, and "save as" them from the Tools palette to the new dataset (this rewrites the header file).
  5. Rerun the statistics.
  6. Now you can evaluate then classify the image as above, now using the newly created virtual dataset.