[gdal-dev] Georeferencing for HDF files

William Hudspeth bhudspeth at edac.unm.edu
Thu Aug 7 06:47:29 EDT 2008


Hello,

I am trying to import an HDF file into GRASS using r.in.gdal. The HDF
file was acquired via a WCS GetCoverage request from a NASA data
archive, and contains one scientific raster grid. According to a
DescribeCoverage WCS request, the data is of global extent (e.g.
90S,90N, 180W,180E) in LatLong-WGS84, but is delivered in the HDF as a
raster grid of 720 by 1440 pixels (presumably, this corresponds to 1/4
degree resolution for the global coverage). When I run gdalinfo on the
HDF file, it shows the following:

Driver: HDF4Image/HDF4 Dataset
Size is 1440, 720
Coordinate System is `'
Metadata:
  units=DU
  _FillValue=-1.267651e+30
  unitsCategory=science
  structureType=Grid
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0,  720.0)
Upper Right ( 1440.0,    0.0)
Lower Right ( 1440.0,  720.0)
Center      (  720.0,  360.0)
Band 1 Block=1440x1 Type=Float32, ColorInterp=Gray

When I try to import into GRASS, it must be brought into an XY location,
with no associated georeferencing.

Can I use any of the GDAL tools to move translate the pixel-based image
coordinates into a file that is in LatLong? What are the paramters for
specifiying a pixel grid?

Thanks,

Bill



More information about the gdal-dev mailing list