[Gdal-dev] assigning projection to geotiff extracted from MOD08 hdf
bhudspeth at edac.unm.edu
Mon Aug 16 15:02:43 EDT 2004
To begin with, I am trying to import MODIS08 atmospheric data files in
HDF-EOS format with GDAL_TRANSLATE. According to the documentation
and metadata associated with MODIS08 files, they are distributed as a
1-degree resolution grid (hence 360 by 180 pixels in dimension) in
Lambert Azuthimal Equal Area projection (measured in degrees). Again,
according to the metadata in the file (using gdalinfo), latitude values
range from -90 to 90 degrees, and longitude values range from -180 to
180 degrees. No information is provided for dataum or ellipsoid.
I have used GDAL_TRANSLATE to successfully extract a single band (1)
from one of the subdatasets (472) in the HDF file using the following
gdal_translate -of GTiff -b 1 -a_srs "+proj=laea +x_0=-180 +y_0=-90"
The output I get is as follows:
Input file size is 360, 180
0.Warning 1: Lost metadata writing to GeoTIFF ... too large to fit in tag.
...10...20...30...40...50...60...70...80...90...100 - done
However, the problems are:
1. Using GDALINFO on the output file, no coordinate system is reported:
Size is 360, 180
Coordinate System is ''
Upper Left ( 0.0, 0.0)
Lower Left ( 0.0, 180.0)
Upper Right ( 360.0, 0.0)
Lower Right ( 360.0, 180.0)
Center ( 180.0, 90.0)
Band 1 Block=360X11 Type=Int16, ColorInterp=Gray
2. Looking at the file in something like ArcMap, the image looks right,
but as seen in the output above, the lower left corner is 0,0,
while it should be something like -180, -90.
3. I have experimented with using different values for x_0, y_0, long_0
and lat_0 that I use in the -a_srs argument to the gdal_translate
summarized above are identical regardless of the values I use.
I would appreciate any ideas on how I can assign the correct projection
to my output data file. I ultimately want to convert its
coordinates back to standard geographic lat-long.
Many thanks for considering my question. Bill
More information about the Gdal-dev