[Gdal-dev] convert HDF to TIF - georeferencing problems

Frank Warmerdam warmerdam at pobox.com
Thu Sep 7 12:59:32 EDT 2006


Pedro Oliveira wrote:
>  
> 
> Good Morning LIST
> 
>  
> 
> I’m trying to import HDF-SMI from MODIS to TiF, and i’m using the GDAL 
> FWTools application.
> 
> I’m using the following sintax for importing the hdf image in a batch 
> file that uses some variables to lock the file name:
> 
>  
> 
> GDAL_TRANSLATE -OF GTIFF %DIRIN%\%%X  %DIROUT%\%%~nX.TIF
> 
>  
> 
> Everything work’s fine. The problem is the this:
> 
> The outpu image is a GeoTiff but it dosn’t have lat/long georeferencing, 
> but has row/column info. Ive tried to use some paramenter like –t_srs or 
> –s_srs in gdalwarp but didn’t work.
> 
> When i use gdalinfo i cn see that the HDF file dosn’t have a explicit 
> geographical information, but the information has lat/long data.
> 
>  
> 
> Is there a way to import image and have the output file as lat/long 
> (wgs84) georefernced

Pedro,

It seems the HDF files don't have "standard" geolocation information.  But
the metadata comments indicate it is equidistant cylindrical (same as
WGS84 geographic for our purposes) for the whole world.  So the following
would produce a GeoTIFF with a coordinate system and bounds.

   gdal_translate A20052132005243.L3m_MO_CHLO_4 out.tif \
             -a_srs WGS84 -a_ullr -180 90 180 -90

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org




More information about the Gdal-dev mailing list