X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 04 Dec 2006 01:07 PM by  anon
Need help writing spatial subset of georeferenced MODIS data in batch ENVI
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
04 Dec 2006 01:07 PM
    I thought this would be simple, but things are not working as I had expected and I am confused. I hope someone can explain what I'm doing wrong. I have many MODIS L2 files from which I want to create a series of maps with data from the same spatial subset. The files are HDF, but are not those that can be directly read by ENVI. Here is what I am doing: Generate an input projection that represents the input file (/Geographic). Generate an output projection for my map, projected using Lambert Conformal Conic and specified standard parallels, central meridian, center latitude, etc. Read the HDF file. Calibrate it (convert counts to geophysical units) Create a Geographic Lookup Table (GLT) using the calibrated longitude and latitude bands from the HDF file and the input and output projections. Georeference the data file using ENVI_GEOREF_FROM_GLT_DOIT Write the georeferenced data an ENVI file Open the georeferenced ENVI data file Use ENVI_CONVERT_PROJECTION_COORDINATES to convert the lat/lon values of the limits of the subregion I want to map to the map coordinates for the Lambert projection (meters) Use ENVI_CONVERT_FILE_COORDINATES to convert the map coordinates (meters) to file coordinates. This should give me the file coordinates of the input file that correspond to my output map. Write the data corresponding to the subset (defined by the file coordinates) to a new ENVI file. There are a bunch of housekeeping steps that I've left out. I don't think they are that important given the strange results I am getting. Here are the strange results. 1. When opened in ENVI, the MAP INFO for the spatial subset file does not show the correct projection or pixel size. Rather than "Lambert Conformal Conic" it shows "pseudo geographic lat/lon". Everything else looks OK. Tech support at ITT suggested that I include the INHERIT keyword when I write the subset file. I set the INHERT parameters after I georeference the input data. 2. Sure enough, when I open the subset image in ENVI, the projection show the correct name and pixel size, but the map UL is incorrect and when I load either the latitude or longitude band into the viewer and use the inquire cursor value function, I find that the LL given do not correspond to the pixel value but the pixel values do correspond to the map limits I've set asked for. I've tried all sorts of combinations of using INHERIT, MAP_INFO, etc. without success. Surely this can't be so hard to do - I must be missing something basic. I need to do this in batch so suggestions involving interactive processing won't help, I'm afraid. Thanks.

    Deleted User



    New Member


    Posts:
    New Member


    --
    04 Dec 2006 01:07 PM
    In case anyone else has a similar problem, here is what I learned (thanks to ITT tech support). First, there was a problem with the input HDF data obtained from NASA. Apparently, the scan line attributes slat, slon, elat, elon, that purport to give the boundaries of the scene (and which I was using to define the GEO_POINTS parameter when generating the GLT in ENVI) refer to the original MODIS scene and not the extracted subregion that I had obtained from the Goddard archive. I fixed this by using the latitude and longitude values in the scientific data set for the corner pixels. Secondly, I misunderstood the documentation for using INHERIT. Rather than use DIMS to define the spatial subset I wanted to extract, I used it to represent the dimensions of the original file from which I was extracting the subset. When I set the DIMS to their proper values (after fixing the GEO_POINTS) the problem I described is corrected.
    You are not authorized to post a reply.