[Gdal-dev] warping MODIS data with gdal

Andrey Kiselev dron at ak4719.spb.edu
Thu Nov 23 09:49:25 EST 2006


Stephen,

On Wed, Nov 22, 2006 at 02:38:37PM -0500, Stephen Hagen wrote:
> I'm trying to reproject raw MODIS data (MOD09A1 Level 3 reflectance data
> in HDF-EOS format) from its original SINUSOIDAL projection to UTM using
> gdal in FWTools. I have encountered several problems. And I need help. I
> put the hdf file that I am working with here: 
> 
> 1) gdalinfo does not recognize the projection information in the MOD09A1
> hdf file:
> 
> 
> $>gdalinfo MOD09A1.A2001289.h08v05.004.2003162200605.hdf
> 
> 
> Driver: HDF4/Hierarchical Data Format Release 4
> Size is 512, 512
> Coordinate System is `'

That is right. HDF file is just container for several different images,
so it is pointless to report size or projection info for the main HDF
dataset.

> 2. gdalinfo does not recognize the sub data set projection information
> either:
> 
> $>gdalinfo HDF4_SDS:UNKNOWN:"MOD09A1.A2001289.h08v05.004.2003162200605.
> hdf":0
> 
> Driver: HDF4Image/HDF4 Dataset
> Size is 2400, 2400
> Coordinate System is `'.....
> Corner Coordinates:
> Upper Left ( 0.0, 0.0)
> Lower Left ( 0.0, 2400.0)
> Upper Right ( 2400.0, 0.0)
> Lower Right ( 2400.0, 2400.0)
> Center ( 1200.0, 1200.0)
> 
> Band 1 Block=2400x1 Type=Int16, ColorInterp=Gray
> Offset: -0, Scale:0.0001

That is fixed now in CVS. Your dataset does not contain "HDFEOSVersion"
metadata record, which is used by GDAL to deduce whether we have HDF-EOS
or just plain HDF file. I added more logic to guess HDF-EOS variants.

Best regards,
Andrey

-- 
Andrey V. Kiselev
ICQ# 26871517



More information about the Gdal-dev mailing list