X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 02 Nov 2017 10:12 AM by  Dulci Avouris
Adding lat/lon data to header files
 8 Replies
Sort:
You are not authorized to post a reply.
Author Messages

Dulci Avouris



New Member


Posts:51
New Member


--
31 Oct 2017 05:14 PM
    Hello! I work with OceanColor MODIS, and Sentinel3A products, which can only be opened in ENVI as an HDF5 file format. When I open the HDF5 files, and display them, I can add the geo-coordinates. However, that geo-reference is lost when I save the HDF5 file as an ENVI file (giving me a .dat), and when I manipulate the images. I want to apply the geo-reference information from the original image to my end-product images, so that I always have a georeferenced image. How do I do that?

    I have tried saving the lat/lon bands as an IGM, and then georeferencing from an IGM, but that is not successful.

    Thanks!

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    01 Nov 2017 07:31 AM
    Are you using FIle->Open As->Scientific Formats->HDF5. This will open the Scientific data browser. Typically there are geometry bands (lat/lon) to associate to the file and when you open the data with this information, it will show it has a 'GLT Geographic' spatial reference. This does not mean that the data is georeferenced and this information does not pass on to the file. You then need to use Reproject GLT with Bowtie correction to georeference the image..
    Can you explain why saving the lat/lon bands and using that for an IGM georeferencing is not succssful?

    Dulci Avouris



    New Member


    Posts:51
    New Member


    --
    01 Nov 2017 08:12 AM
    That is the procedure that I am using to open the HDF5 files. The files that I am importing into ENVI are already georeferenced (in SeaDAS or SNAP, depending on which sensor I am working with), L2 files. Will the Retroject GLT with Bowtie correction work on already georeferenced files?

    When I try to save the lat/lon bands, the save raster fails, so if I try to do it just from the opened HDF5 file bands instead of a saved IGM*name* .dat file, ENVI chokes, gives me an error and processes for hours. I don't let it go anymore - if it doesn't work within a few minutes then I kill the program. I didn't save a screen shot of the error - I can do that & post it here.

    A follow-up question is: I don't want to further resample my pixels, because they were already resampled in the original georectification step. Is this process going to re-georectify the image? And potentially shift things out of place?

    Thanks!

    Dulci Avouris



    New Member


    Posts:51
    New Member


    --
    01 Nov 2017 08:30 AM
    Here is the error I get when trying to georeference my image from the lat/lon bands in the original HDF5 image file.

    "An error was caught in the main event handler.
    Error: Array dimensions must be greater 0."

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    01 Nov 2017 09:59 AM
    If the data are already georectified, then you do not need the lat/lon bands which are only used for georectifyinig non-georectified files. In this case, I would open your data set using the scientific data browser and save the result to an ENVI format file. Then I would use View Metadata->Edit Metadata and add the spatial reference to the file. Do you know what projection the data was georectified to? You will need this information as well as the coordinate for one of the pixels (typically upper left corner) and the pixel size. Save this to the metadata and the file will open with the spatial reference and you can export it to other formats.

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    01 Nov 2017 10:04 AM
    It appears that ENVI 5.4.1 does support Sentinel-3:
    http://www.harrisgeospati...upportedFormats.html

    ENVI supports Sentinel-3 OLCI Level-1 and Level-2 products. Use the File > Open or File > Open As > Optical Sensors > European Space Agency > Sentinel-3 OLCI menu option and select a .xml file to open. You can use the Reproject GLT with Bowtie Correction tool to georeference the data.

    ENVI supports Sentinel-3 SLSTR Level-1 and Level-2 products. Use the File > Open or File > Open As > Optical Sensors > European Space Agency > Sentinel-3 SLSTR menu option and select a .xml file to open. You can use the Reproject GLT with Bowtie Correction tool to georeference the data.

    Dulci Avouris



    New Member


    Posts:51
    New Member


    --
    01 Nov 2017 11:22 AM
    Thank you! My projected image (the original image) is GLT lat/lon WGS-84 - where do I find that in the drop down list of standard projections?

    Also - I have ENVI 5.4, I will need upgrade to 5.4.1 to gain the Sentinel-3 capability. I am using a Mac - does that make a difference?

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    01 Nov 2017 12:15 PM
    GLT lat/lon is not a standard projection. It means that there are lat/lon bands associated with the file that provides lat/lon coordinates on the displayed file but it is not corrected. You will need to use Reproject GLT with Bowtie correction to convert it to a standard projection.

    Yes, Sentinel-3 support was added in the service pack for ENVI 5.4.1. You should upgrade if possible and it is also supported for Mac.

    Dulci Avouris



    New Member


    Posts:51
    New Member


    --
    02 Nov 2017 10:12 AM
    Thank you so much for the help! I will test it out right now!

    And also check for the upgrade. Excellent!
    You are not authorized to post a reply.