hdf4 patch for modis 9 product to pick up geometry info.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

hdf4 patch for modis 9 product to pick up geometry info.

David Burken
Hi Frank,

Your hdf mail made me think of this.

The following diff allows me to pick up the geometry info from an hdf4
modis 9 product.  I'm not sure if this is the best way to do it but it
seems to work.
I'm also have problems finding another tool that can verify the
correctness of the geometry.  ENVI does not pick it up, at least mine
trial version anyway.  In ossim it seems to be off in the latitude
direction by about nine minutes when swiped against an elevation cell.  
It's a "sinusoidal " projection.

Let me know if you want the whole file.

Here is the diff for file (basically two lines):  
 >     else if ( CSLFetchNameValue(poDS->papszGlobalMetadata,
"HDFEOSVersion") ||>               ( (pszValue =
 >                                                "PARAMETERNAME"))
 >                 && EQUALN( pszValue, "MOD09A1", 7 ) ) )
 >      {
 >         poDS->iSubdatasetType = EOS_GRID;
 >         poDS->pszSubdatasetType = "EOS_GRID";
 >      }
<     if ( CSLFetchNameValue(poDS->papszGlobalMetadata, "HDFEOSVersion") )
 >     if ( poDS->iSubdatasetType == EOS_GRID )

Take care,

ps: Curious how your big tiff is doing???

mailto:[hidden email]

Gdal-dev mailing list
[hidden email]