X
6948

How do I manually enter map registration information about an image in ENVI?

Often there is a need to manually enter map registration information about an image in ENVI when this information can't be automatically read from the image, header, or metadata files using ENVI's generic or custom file readers. This Help Article describes how to enter the correct map information for georeferenced images in the ENVI header dialog using EOS-ASTER data in HDF format as an example.

With an increasing variety of image data sources and formats, it is difficult to be able to automatically read in all of the information embedded in the image or contained in associated header or metadata files. For example, ENVI reads EOS-ASTER 1B (Advanced Spaceborne Thermal Emission and Reflection Radiometer) data in HDF (heirarchical data format) and extracts the map information from the HDF tags in the header to register the image. However, EOS-ASTER also comes in a variety of "On-demand" products (AST05, -07, -13, etc.) in which the embedded HDF tags and number of image bands are different for each product. While ENVI can read, open, display, and extract the map information from most image data formats, some information (such as the map information about a geometrically corrected image) contained in the image or ancillary files distributed with the data product might not be directly read into ENVI. This information can, however, be easily entered and saved to an ENVI header file that, once defined, will display the map coordinate information on the image and allow you to convert to other map projections in ENVI.

Note: An AST_05 (surface emissivity) product will be used as an example. This data is distributed geometrically corrected and projected in a UTM projection through the EOS Data Gateway.

  1. Open the HDF file in ENVI using either File -> Open Image File or File -> Open External File -> Generic Formats ->HDF. The HDF Dataset Selection dialog will open. This dialog is necessary because HDF files can contain plot as well as image data, so the user must select the appropriate files to open. For this dataset, the image data are Bands 10-14. Open these files by selecting the Band 10 file, then holding the shift button down and selecting band 14 (Figure 1). Select OK and the bands are loaded into the Available Bands List separately as single band files.

    Figure 1.  The HDF Dataset Selection dialog

  2. Next, it is necessary to find the projection information in the HDF file so that it can be entered into the ENVI header. In the main ENVI menu, go to Basic Tools -> Preprocessing -> Data Specific Utilities -> View HDF Global Attributes. Select the HDF file and then Open. The HDF file tags which describe the data product are displayed.

    Note: On windows systems, the text in this dialog can be difficult to read. In the Global Attributes window, select File -> Save Text to ASCII. The text file can be opened in a text editor such as WordPad, and the text will be more readable.

    Begin searching for relevant projection information in the attributes. For this HDF product, the following tags contain information about the projection parameters and latitude/longitude coordinates for the image extents:

    • MAPPROJECTIONNAME
    • PROJECTIONPARAMETERS
    • UTMZONECODE
    • SCENEFOURCORNERS (UPPERLEFT, UPPERRIGHT, LOWERLEFT, LOWERRIGHT)
    • SCENEORIENTATIONANGLE

    For example, the MAPPROJECTIONNAME is set to UTM and the PROJECTIONPARAMETERS tag reveals this information:
    VALUE = (6378137.000000, 6356752.300000, 0.999600, 0.000000, -1.204277, 0.000000, 500000.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000)

    HDF projection parameters for this data product follow the GCTP (General Cartographic Transformation Package) standards. Please see HDFEOS for additional information.

  3. This is the information that needs to be entered in the ENVI header to georeference the image. Go to File -> Edit ENVI Header and select one of the open HDF files. In the Header Info dialog, go to Edit Attributes -> Map Info. The Map Information dialog is opened. This dialog is used to enter map projection information for a pixel in the image, from which all other pixel coordinates are calculated.

  4. In the dialog boxes labeled Image Coord X and Y, enter 1.5 and 1.5. This is the image pixel for which we have known coordinates.

    Note: ENVI considers the image coordinate of 1, 1 to be the upper left corner of the upper left pixel. Because ASTER data is georeferened from the center of the pixel, a half-pixel offset is entered in this dialog.

  5. Next, enter the correct pixel size for this image. This ASTER scene contains thermal bands in the UTM projection, so the correct pixel size is 60 X 60 meters. For images in a geographic latitude/longitude projection system, enter the X and Y pixel size in decimal degrees.

  6. Enter a Map Rotation factor, if applicable. ASTER data typically have a scene orientation angle that should be entered in this dialog. In this example, a value of -9.020791 is entered from information contained in the SCENEORIENTATIONANGLE tag.

  7. Next, specify the current map projection for the image. Select the Change Projection button, and select the appropriate projection and datum for the dataset. For this example, the correct projection is UTM and the datum is WGS-84. The UTM projection also requires that you specify the UTM zone (as specified in the UTMZONECODE). In this example, the image is in UTM zone 19.

    Note: ASTER data products use the WGS-84 datum. For more information on the AST_05 data product or other ASTER Data Products, see the ASTER Data Products and Applications webpage at the EOS data gateway.

  8. Using information in the UPPERLEFT tag, enter the map coordinates for the image pixel. For this dataset, the UPPERLEFT coordinate information is in digital degrees of latitude/longitude. Enter this information by toggling the up/down arrow box next to the dialog box showing the currently selected map projection. This allows coordinates to be entered in degrees/minutes/seconds, then ENVI will convert the coordinates to the selected map projection on-the-fly. Selecting the DDEG button allows entry of latitude/longitude in digital degrees. Enter the latitude/longitude information from UPPERLEFT in digital degrees (Figure 2).

    Figure 3. Entering coordinates in digital degrees in the Map Information dialog.

  9. The Map Information dialog should now be complete (Figure 3). Select OK to accept the changes made to the Map Information dialog, then OK again to accept the information into the ENVI header file.

    Figure 2.  The Map Information dialog.

    Note: If the image is currently displayed and changes are made to the ENVI header file, the display window will close. This is because ENVI now has new information about how to display the image, so the image must be re-displayed in order to use the new information.

  10. If there are multiple bands in the original HDF file, each band will be imported and displayed in the Available Bands List as though they are separate files in ENVI. However, once the map information is entered into one of the file headers, the other files in the HDF will inherit the map information as well. To combine the separate bands into one file, use File -> Save File As -> ENVI Standard.

    Note: ENVI's Layer Stack utility under Basic Tools can also be used to create a multiband file from georeferenced images of various pixel sizes, extents, and projections, while ENVI Meta files (under File -> Save File As -> ENVI Meta) are multiband files with a virtual file structure, in which no new disk file is actually created. Be aware that ENVI Meta files can only be created from ENVI format files.

Additional Information about ASTER data products discussed in this Tech Tip:
ASTER Higher-Level Product Users Guide
ASTER Algorithm Theoretical Basis Documents (ATBD)


Review on 12/31/2013 MM