[gdal-dev] gdalbuildvrt, gdal_translate, and MODIS HDF files

Even Rouault even.rouault at mines-paris.org
Sat Apr 30 14:26:12 EDT 2011


Le samedi 30 avril 2011 17:34:28, Jonathan Greenberg a écrit :
> GDALers:
> 
> I have recently come across the mosaicking magic that is 1) build a vrt
> usin gdalbuildvrt and then 2) gdal_translate the vrt to whatever format I
> want -- I'm noticing this is a crazy-fast way to do mosaicking compared to
> some other techniques.  My current issue is that I have a set of MODIS
> HDF4 files, and I'd like (if possible) to repeat this process, using a
> specific layer in the HDF to be mosaicked.  What is the trick to doing
> this?  As far as I know, all the tiles have the same subdataset name.  I
> suppose I can gdal_translate each tile first, then build the vrt, then
> re-export the vrt, but I wanted to know if there was a faster way to do
> this (e.g. skipping the initial gdal_translate)?
> 
> Here's the gdalinfo dump of one of the tiles.  I'm interested in mosaicking
> the
> HDF4_EOS:EOS_GRID:"MCD15A2.A2002185.h14v10.005.2007172042412.hdf":MOD_Grid
> _MOD15A2:Lai_1km subdataset layer:

You should be able to use directly the subdataset name as an input dataset 
name for gdalbuildvrt. No need for it to be a "real" filename.


More information about the gdal-dev mailing list