[Gdal-dev] Assigning correct projection info to GEotiff extracted
from MODIS 08 atmospheric HDF
William Hudspeth
wbhk at unm.edu
Fri Aug 13 12:31:44 EDT 2004
Hello,
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
command:
gdal_translate -of GTiff -b 1 -a_srs "+proj=laea +x_0=-180 +y_0=-90"
HDF4_SDS:UNKNOWN:"MOD08_D3.A2002174.004.2003228005230.hdf":472 mod08test.tif
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:
Driver: GTiff/GeoTIFF
Size is 360, 180
Coordinate System is ''
Corner coordinates:
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
call.The results 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
mailing list