[Gdal-dev] HDF4 driver and Landsat L1G metadata

Mario Beauchamp starged at videotron.ca
Thu Feb 5 16:54:55 EST 2004


Hi,

I am trying to convert to geotiff the Landsat L1G images found on the GLCF site
(http://glcfapp.umiacs.umd.edu:8080/esdi/index.jsp). The conversion with gdal_translate works fine
except there is no georeferencing info in the output file.

Here's the gdalinfo output:
$ gdalinfo L71012031_03120020410_HDF.L1G
Driver: HDF4/Hierarchical Data Format Release 4
Size is 512, 512
Coordinate System is `'
Subdatasets:
  SUBDATASET_1_NAME=HDF4_SDS:UNKNOWN:"L71012031_03120020410_HDF.L1G":0
  SUBDATASET_1_DESC=[7441x8361] L71012031_03120020410.B10 (8-bit unsigned integer)
  (...)
  SUBDATASET_9_NAME=HDF4_SDS:UNKNOWN:"L71012031_03120020410_HDF.L1G":8
  SUBDATASET_9_DESC=[14881x16721] L72012031_03120020410.B80 (8-bit unsigned integer)

The metadata for this dataset is in the L71012031_03120020410_MTL.L1G file but it is apparently
ignored by the driver.

Has anybody tried to modify the HDF4 driver so it can read the georeferencing from this file?
If not, how difficult would it be? I could try but I'm still a newbie in C/C++ and this could take a
while...

The only information needed from this file would be:

GROUP = L1_METADATA_FILE
  (...)
  GROUP = PRODUCT_METADATA
    (...)
    PRODUCT_UL_CORNER_MAPX = 181800.000  
    PRODUCT_UL_CORNER_MAPY = 4738200.000
    (...)
  END_GROUP = PRODUCT_METADATA 
  (...)
  GROUP = PROJECTION_PARAMETERS 
    REFERENCE_DATUM = "WGS84" 
    REFERENCE_ELLIPSOID = "WGS84" 
    GRID_CELL_SIZE_PAN = 15.000           
    GRID_CELL_SIZE_THM = 60.000           
    GRID_CELL_SIZE_REF = 30.000           
    ORIENTATION = "NUP"
    RESAMPLING_OPTION = "CC"
    MAP_PROJECTION = "UTM"
  END_GROUP = PROJECTION_PARAMETERS 
  GROUP = UTM_PARAMETERS 
    ZONE_NUMBER = 19
  END_GROUP = UTM_PARAMETERS 
END_GROUP = L1_METADATA_FILE 
END

Also, these files are 0's filled to make them 64KB so I don't know if this can cause problems for
reading.

The gdal tools used come from OpenEV 1.70 (for Windows).

Thanks in advance for any help.
--
Mario B.
My Landsat images:
http://pages.infinit.net/starged/landsat/home.html



More information about the Gdal-dev mailing list