Importing Raw Landsat Data inot ERDAS Imagine Format
(David Wallin, 12/7/06))
Back to the GIS Tutorials & Help Page... Back to the SAL Home Page...
Importing Raw Landsat Data into ERDAS Imagine Format
Modified 6/4/2008 (D. Wallin)
Landsat data comes in lots of different formats. This file does not address every conceivable format that you may encounter but it should illustrate the basic approach. The basics are described in Chapter 8 Import/Export of the ERDAS Imagine Tour guide (v9.0). I did not find this chapter to be particularly helpful.
Importing Binary Image Files: (see the NEXT section for a description of importing images obtained as individual files in Geotiff format) The discussion below covers the import of the following image:
This image came with a full set of header files and includes the non-thermal band (ETM1-5,7), the thermal band (ETM6,9) and the panchromatic band (ETM8). This discussion will focus on importing the non-thermal bands. For this image, there is lots of important information in the various header files and it takes some careful digging to locate the information that is needed from each of these files. You will need to take some time skimming through each of these files to determine pixel size, # rows and columns, projection information, etc.. Note that data for each band are stored in binary f iles (.I1,….I9) and that these binary files contain no header information.
Go to Import from the main ERDAS Imagine toolbar. Select Import, Type: Generic Binary, Media: File, then select the binary file containing ETM band 1.
Then select a folder and a name for the output file.
Note: At this point, it appears that you are only
importing a single TM band. Don’t worry, the next few steps
will illustrate how to import all of the individual nonthermal bands from
separate binary files into a single multiband .img file. The
Tour Guide does not explain this at all!
Click OK from the Import/Export Dialog box. This brings up the Import Generic Binary Dialog box. Click on the Help button for more information about each entry in this dialog box. Enter the following:
Under Data Description, enter Data Type:
BSQ, Data Type: Unsigned 8 Bit
Under Tape/File Options enter File Header
Under Image Dimensions, enter #Rows: 7201,
#Cols: 7553, #Bands: 6
Note: The values for #Rows, #Cols are obtained from the header files. In this case, I found this information in the .H1 file and the #Rows is given as “Lines_per_data_file” and the #Cols is given as “pixels_per_line”. This file also confirms that Data type is unsigned 8 bit although this is indicated by as “BITS_PER_PIXEL=8” and “PIXEL_FORMAT=BYTE”.
As explained in the Help file, the Image Record Length can be left at zero and a value will be calculated based on Line header bytes (0 in this case), the #Cols and the Bytes per Pixel (1 in this case). Image Record Length in this case will equal the #Cols.
Under BSQ Options, check the box for Bands in Multiple Files. This will bring up the BSQ Band Files Dialog box
In this Dialog box, you can specify the six individual binary files (files containing the image data for each of the nonthermal bands) that you want to include in your multiband .img output file. One at a time, select the Band#, highlight the filename (one of the binary image files, .I1, ……I7), then click on the Set button.
After entering all six bands, click on the OK button.
You don’t really need to specify anything in the Preview Options or Load Options but you can take a look at these if you’d like. You can also hit the Preview button if you want to take a quick look at a degraded version of the image prior to importing the whole thing.
Finally, click on the OK button. The Importing Generic Binary Data Progress meter will come up and the program will chug along for several minutes. Be patient.
After it is finished, you can open up a Viewer and take a look at the image. In the Viewer, go to Utilities/Layer Information. You will note that there is no map model and no projection information. You will need to enter this information by going to Edit/Change Map Model. Enter the projection, pixel size and the coordinates of the upper left corner of the image. This information can be found by digging through the header files. Note that this image is in UTM, NAD27 with 30m by 30m pixels. You will need to dig around to find the UTM coordinates for the upper left corner of the image. After entering the pixel size and the coordinates of the upper left corner, go to back to the ImageInfo window. Under Map Info, make sure that the coordinates for the upper left and lower right corner now agree with the coordinates from the header files. Then go to Edit/Add/Change Projection Information. Specify the projection and the datum. Just to be clear, I also like to label each layer. Go to Edit/Change Layer Name and specify something like TM_Band_1, …..
Importing Geotiff Images: (this section added June 4, 2008) Landsat images are sometimes distributed as a series of Geotiff files with separate Geotiff files for each band. The procedure for importing these into a single ERDAS Imagine file is a bit different. This section describes the process of importing the following image:
Begin as above. Go to Import from the main ERDAS Imagine toolbar. Select Import, Type: Geotiff, Media: File, then select the Geotiff for TM band 1.
Click OK. Similarly, on the Import Tiff window, click OK.
After the import process is complete, you can view the image. Then repeat this process for each of the other bands.
From the main ERDAS toolbar, go to the Interpreter/Utilities/Layer
Stack module to combine your individual *.img files into a single multilayer
*.img file. From the Layer Selection and Stacking dialog
box, select your first TM band, then click the Add button to add it to the list
of files that you want to combine into a single multilayer .img file.
Then select the second input file and click the Add button again to add
to your list of input .img files. Continue this process for
each band that you want to add. For this example, I wanted to
use all of the non-thermal bands (TM 1-5, 7).
After adding all the layers, specify an output filename and fill in the remaining options. Then click OK to run the procedure.
After this finished, you can go to a Viewer window and open the image. Go to Utilities/Layer Information. You will note that, since this was imported from Geotiff files, there is complete map projection information. I like to go to Edit-Change Layer Name to give each layer a more descriptive name (e.g. something like “TM_Band1,” instead of the default name of simply “Layer 1”). This renaming is particularly important if you have imported only the non-thermal bands. In this case, the default layer names are potentially confusing (e.g., “Layer 6” is really TM Band 7).
Back to the GIS Tutorials & Help Page... Back to the SAL Home Page...
ISIA | HML | SAL | Website (stefan) | Lab Manager (Dave Knutson)