How to mosaic the same HDF files using this R function? -


there more 1,000 modis hdf images in folder:

m:\join 

their names show files must mosaiced together.

for example, in below files, 2009090 means these 3 images must mosaiced together:

mod05_l2.a2009090.0420.051.2010336084010 mod05_l2.a2009090.0555.051.2010336100338 mod05_l2.a2009090.0600.051.2010336100514 

or these two, same date, 2009091:

mod05_l2.a2009091.0555.051.2010336162871 mod05_l2.a2009091.0600.051.2010336842395 

i going mosaic them using function (source of function ):

mosaichdf(hdfnames, filename, mrtpath, bands_subset, delete=false) 

how should introduce hdf files hdfnames?

and should write in filename?

i tried find manual function, there not anything.

thanks help.

i did find answer, fortunately. help.

hdfs <- c('mod05_l2.a2009090.0420.051.2010336084010.hdf',           'mod05_l2.a2009090.0555.051.2010336100338.hdf',           'mod05_l2.a2009090.0600.051.2010336100514.hdf')  mosaichdf(hdfnames=hdfs, filename='newhdf.hdf', mrtpath='c:/mrt/bin',bands_subset="1 0 0 0", delete=false)  

but have new problem :-)

since there thousands of hdf files in folder,

how write loop introduce hdf files function?

fyi: quite new r.


Comments

Popular posts from this blog

javascript - Bootstrap Popover: iOS Safari strange behaviour -

Magento/PHP - Get phones on all members in a customer group -

session - Logging Out Using PHP -