10 - Creating ArcMap-ready GeoTIFF files from HDF files using FWTools.

 

Purpose: To convert from HDF to GeoTiff in preparation for ArcGIS.
Software/Platform: FWTools - Windows and Linux.

Cautions & Limitations: FWTools can only create a GeoTIFF that can be successfully read into ArcMap if the original HDF file contains the appropriate spatial reference information (aka EOS_GRID). An example of this type of file is HDF-EOS (Hierarchical Data Format-Earth Observing System). Other HDF files containing only an SDS (Scientific Data Set) or unknown grid will produce a GeoTIFF file that can be imported to ArcMap, but they cannot be projected.

Procedure:

Begin by launching FWTools in Windows. It contains a subpackage called GDAL, which is a translator library for raster geospatial data formats. Commands may be entered directly into the FWTools Shell. Two useful commands are:

1. gdalinfo - to report information about a file

2. gdal_translate - to copy a raster file, with control of output format

For example, to convert the MODIS file MOD11A1.A2008006.h16v07.005.2008007232041.hdf
into a GeoTIFF, first retreive the information about the file:

gdalinfo MOD11A1.A2008006.h16v07.005.2008007232041.hdf

This will return information on all of the subdatasets, from which you must select one of interest. Here we will use:

SUBDATASET_12_NAME=HDF4_EOS:EOS_GRID:
"MOD11A1.A2008006.h16v07.005.2008007232041.hdf":MODIS_Grid_Daily_1km_LST:Clear_night_cov

The selected subdataset can then be processed to a geoTiff:

gdal_translate -of GTiff HDF4_EOS:EOS_GRID:"MOD11A1.A2008006.h16v07.005.2008007232041.hdf"
:MODIS_Grid_Daily_1km_LST:Clear_night_cov modis_ds12.tif

This will return a GeoTIFF with the file name modis_ds12.tif.







Last update on Friday, February 4, 2011.