Atmospheric Science Data Center; Link to Home Page.

Instructions for setting Space Oblique Mercator (SOM) map information for conventional HDF-EOS format MISR products in ENVI version 4.0

These instructions apply to conventional HDF-EOS format MISR products only. They do not apply to the stacked-block format MISR products which are obtained directly from the EOS Data Gateway. Conventional HDF-EOS format MISR products are obtained via the MISR Data Subsetting Interface at the NASA Langley Atmospheric Science Data Center.

Steps:
  1. Open the HDF-EOS file using the generic HDF import option. This can be found in the ENVI main menu under "File"->"Open External File"->"Generic Formats"->"HDF"

    This will bring up a file selector window for selecting the HDF file to open. Once a file is selected, ENVI displays a list of datasets within the selected file, and asks for datasets to open. Note that each HDF-EOS field is handled as an independent dataset in ENVI. After selecting datasets, a new window appears with the title "Available Bands List". This window lists all the datasets currently open and allows them to be selected for display as either "gray scale" or "RGB color". At this point, an image can be displayed, but the image will not be geolocated, and ENVI will not display lat/lon values for each pixel. So now is the time to setup the map information. Leave the "Available Bands List" window open, since it is needed again for step 3.

  2. The next step is to get the meta-data values needed to setup the map information. All the information needed can be found in the HDF-EOS structural metadata. To access this information, select from the ENVI main menu, "Basic Tools"->"Preprocessing"->"Data-specific Utilities"->"View HDF Global Attributes". Then select the same HDF-EOS file selected in step 1. A window should appear containing the "StructMetadata.0" attribute. Within this attribute is a long list of name=value pairs, including "XDim", "YDim", "UpperLeftPointMtrs","LowerRightMtrs" and "ProjParams", among others.

    These name=value pairs are grouped by HDF-EOS grid name, and there can be more than one grid in an HDF-EOS file, so you need to be careful to choose values for the correct grid. One way to identify the correct grid, is to compare the "XDim", "YDim" values to the dataset sizes reported by ENVI in step 1. These values should match.

    Once you have the correct grid, make a note of the parameters "XDim", YDim", "UpperLeftPointMtrs", "LowerRightMtrs" and "ProjParams". You will need these in subsequent steps.

  3. Now we will setup the map information for each dataset. Right click on a dataset in the "Available Bands List" window, and select "Edit Header". A new window appears with an "Edit Attributes" button near the top. Click "Edit Attributes"->"Map Info". A map information windows appears. The map information window, is used to register a point in the image (in pixel units) to a point in the associated map projection (in meters for SOM).

    The first thing to do is set the map projection to SOM. To do this, click the "Change Proj" button. A window appears with a list of projection names. If you've already configured the SOM projection for this MISR file, you can simply select it from the list, then click "OK", and skip to step 4. Otherwise, click the "New" button. A window appears for configuring a custom map projection.

    MISR uses a different SOM map projection for each of the 233 unique orbit paths of the Terra spacecraft. A recommended way to keep track of these projections is to name them according to path number. For example, "MISR SOM Path 1", "MISR SOM Path 2", ...etc. At the end of this document is a list of all 233 MISR SOM projections in ENVI format. If you wish you can predefine the projection parameters for all 233 paths by appending this list to the ENVI "map_proj.txt" file. Otherwise just choose any name you like for the "Projection Name" field.

    In the "Projection Type" field, choose "Space Oblique Mercator A (generic)". ENVI will then reconfigure the window for the parameters of this projection type. All but one parameter "Longitude of ascending orbit" should be identical for all MISR SOM projections. Enter these now as indicated below:

         Projection Datum = WGS-84
         Ellipsoid = WGS-84
         False easting = 0
         False northing = 0
         Inclination of orbit at ascending node = 98 degrees 18 minutes 13.75 seconds (or 98.303819)
         Period of satellite revolution in minutes = 98.88
         Landsat ratio = 0
    

    The remaining parameter, "Longitude of the ascending orbit" has a different value for each of the 233 orbit paths. The value to enter in this field is the 5th element of the ProjParams array obtained in step 2. This will be the value immediately after 98018013.75 in that array. Example,

         ProjParams=(6378137,-0.006694,0,98018013.750000,-37033040.870000,0,0,0, 98.880000,0,0,0,0)
    

    Note the format of ProjParams is packed degrees, minutes, seconds format (DDDMMMSSS.SS). So, for example, the value -37033040.87 corresponds to -37 degress, -33 minutes, -40.87 seconds (or -37.561353 degrees).

    Once all the above are set, click "OK", to save the new projection. ENVI will prompt for the location of the "map_proj.txt" file in which to save this projection. Choose an appropriate location and click "OK".

    Now the projection entered above should appear in the list of projections. Choose this projection and select "OK". Proceed to step 4.

  4. Register the image coordinates to map coordinates. For this step, we need to know the minimum and maximum SOM map coordinates (in meters). These values are defined by UpperLeftPointMtrs and LowerRightMtrs parameters obtained in step 2.

         UpperLeftPointMtrs = (min X, max Y)
         LowerRightMtrs = (max X, min Y)
    

    For example, if we have

         UpperLeftPointMtrs=(7460750.000000,1161050.000000)
         LowerRightMtrs=(32804750.000000,-1144550.000000)
    
    then,
         min X= 7460750.0
         min Y = -1144550.0
         max X = 32804750.0
         max Y = 1161050.0
    

    The other information needed is the pixel size (or resolution) in meters for both X and Y. If you are familiar with MISR data, you may already know the pixel size. MISR data comes in a limited set of resolutions: 275 meters, 1.1 km, 2.2 km, 17.6 km, 35.2 km, and 70.4 km. Otherwise, if you don't know the resolution, it can be calculated by dividing the map size in meters by the map size in pixels. The map size in meters is simply the maximum SOM coordinate - minimum SOM coordinate. The map size in pixels is defined by XDim and YDim. That is,

         resolution X = (max X - min X) / XDim
         resolution Y = (max Y - min Y) / YDim
    

    For MISR SOM projected data, the minimum image coordinate is registered to the minimum SOM map coordinate. The minimum image coordinate in ENVI is (1,1), which corresponds to the upper left corner of the upper left pixel in the ENVI display window. That corner should be registered to the min X, min Y, corner of the SOM map. In the map information window, enter the information as indicated below:

         Image Coord X = 1
         Image Coord Y = 1
         Pixel Size X = resolution X
         Pixel Size Y = resolution Y
         Map rotation = 90.0
         Map Coord X (labelled E) = min X
         Map Coord Y (labelled N) = min Y
    

    The map rotation of 90.0 degrees is a result of the "lower left" grid origin used for MISR, as defined by the GridOrigin parameter in the HDF-EOS structural metadata. This value is the same for all SOM projected MISR products.

    Once all the above parameters are set, click "OK" to close the map information window, then click "OK" again to close the header information window.

    You should now see the "Map Info" attribute attached to the dataset in the "Available Bands List" window. This means the dataset is now geolocated and ENVI is capable of calculating and displaying lat/lon values for each pixel of that dataset.

    Repeat steps 3 and 4 for each of the datasets you wish to be geolocated.

  5. Although not necessary, it is highly recommended that you verify the geolocation is correct. To do this, you can compare the lat/lon values calculated by ENVI with the lat/lon values stored in the Latitude and Longitude fields of the MISR data. Simply follow the steps above for a pair of Latitude and Longitude fields.

    First you will need to find Latitude and Longitude fields to test. Most conventional HDF-EOS format MISR products will have Latitude and Longitude at a resolution of 17.6 km. The MISR AGP additionally has latitude and longitude fields at a resolution of 1.1 km. Note that at resolutions of 35.2 km and 70.4 km, latitude and longitude fields may not be suitable for verifying geolocation due to geolocation issues described in the MISR Subsetted / Reformatted Products Quality Statement.

    Once you have the Latitude and Longitude fields geolocated using the steps above. Select the "RGB Color" option in the "Available Bands List", and then select both the latitude and longitude fields along with any other field, and click "Load RGB". The ENVI display window will appear. In the menu of the display window, choose "Tools"->"Cursor Location/Value". The "Cursor Location / Value" window will appear, and should display both map coordinates and lat/lon coordinates for the current cursor location, along with the data values in each band. For example, the window should contain text similar to the following:

         Disp #1 (1880,2680) Scrn: R:95 G:215 B:0
         Projection: MISR SOM Path 108
         Map: 10407650.03E,922349.96N Meters
         LL : 80°49'26.40"N, 153°17'53.58"W
         Data: R:-153.317093 G:80.817719 B:0
    

    Note that the lat/lon values may be displayed in degrees, minutes, seconds (DMS) format. You'll want to switch this to floating point format using a check box in the Options menu at the top of the window. Also in the Options menu is the option to display "Floating point location". You'll want to set that option also, so you can position the cursor at the center of a pixel and get the precise lat/lon value at the center.

    To verify lat/lon calculated by ENVI, simply position the cursor at the very center of any pixel within the MISR swath. The pixel coordinates at the top of the Cursor Location / Value window should be close to 0.5 offset from a nearby integer. You may want to zoom in close in the image to get the cursor centered more precisely. Example,

         Disp #1 (1874.515,2675.515) Scrn: R:255 G:62 B:0
         Projection: MISR SOM Path 108
         Map: 10402716.68E,916316.61N Meters
         LL : 80.889582N, 153.148031W
         Data: R:80.889771 G:-153.147446 B:0
    

    The pixel coordinates in the example above are 1874.515, 2675.515, which are not precisely the center of the pixel, but are close. The lat/lon value calculated by ENVI is 80.889582N, 153.148031W. The data values stored in the latitude / longitude fields at this location are 80.889771, -153.147446, which are very close to those calculated by ENVI. This confirms that the map information is set correctly and the dataset is properly geolocated.

MISR SOM map projection parameters in ENVI format

Download MISR SOM map projection parameters

These may be appended to the ENVI "map_proj.txt" file to eliminate the need to manually enter SOM projection parameters for each of the 233 MISR orbit paths.


Main Quality Statement | MISR Data and Information | ASDC Home Page | Questions/Feedback