1

Hi i am trying to stitch two modis tiles and also extract my bands of interest which are EVI and pixel reliability. the steps i took are as follows.

  1. loaded the files into ModisTool
  2. selected my bands of interest
  3. specified the output files MOD13Q1.A2001001.tif
  4. output projection Albers Equal Area
  5. pixel size 1000 meter
  6. saved the parameter file as prm in the same directory as the modis tiles (MOD13Q1.A2001001.prm)
  7. I went to my bash script and made my directory to my data folder
  8. then i ran my bash script

cd F:/mod

day=2001001 #start time

while [ $day -le 2001353 ] #end time serial
do

for trl in MOD13Q1.A$day.*.hdf # modis image file names do

if [ -f $trl ] then HDFFILES=$(ls MOD13Q1.A$day.*.hdf) echo $HDFFILES > MOSAICINPUT.TXT

MRTMOSAIC -i MOSAICINPUT.TXT -s "0 1 0 0 0 0 0 0 0 0 0 1" -o MOSAIC_TMP_$day.hdf

RESAMPLE -p MOD13Q1.A2001001.prm -i MOSAIC_TMP_$day.hdf -o MOD13Q1.A2001001_$day.tif

#MOD13Q1.A2001001.PRM the .prm file i have saved before

let "day=day+16" # the modis image time interval such as 8day,16day...

break else let "day=day+16" break fi

done done

Blockqenter image description hereuote

I was unable to get tif bands out of the HDF but tiles were stitched mosaicing worked perfectly but band extration did not, below is my output folder containing mosaic of the HDF files but no tif files were produced.

enter image description here

parameter file

`#The "INPUT_FILENAMES" field would be commented. If you want to load multiple input files please uncomment the "INPUT_FILENAMES" field and comment the"INPUT_FILENAME" field.

Also the "ORIG_SPECTRAL_SUBSET" field needs to be uncommented and changed to "SPECTRAL_SUBSET". The initial "SPECTRAL_SUBSET" field should be deleted.

INPUT_FILENAMES = ( F:\mod1\MOD13Q1.A2000353.h18v07.005.2006346094439.hdf F:\mod1\MOD13Q1.A2000353.h19v07.005.2006346094356.hdf F:\mod1\MOD13Q1.A2001001.h18v07.005.2008270012522.hdf F:\mod1\MOD13Q1.A2001001.h19v07.005.2008270024030.hdf F:\mod1\MOD13Q1.A2001017.h18v07.005.2006357183017.hdf F:\mod1\MOD13Q1.A2001017.h19v07.005.2006357183619.hdf F:\mod1\MOD13Q1.A2001033.h18v07.005.2008271203338.hdf F:\mod1\MOD13Q1.A2001033.h19v07.005.2008271203843.hdf F:\mod1\MOD13Q1.A2001049.h18v07.005.2007002002953.hdf F:\mod1\MOD13Q1.A2001049.h19v07.005.2007002004335.hdf F:\mod1\MOD13Q1.A2001065.h18v07.005.2007005221524.hdf F:\mod1\MOD13Q1.A2001065.h19v07.005.2007005222551.hdf F:\mod1\MOD13Q1.A2001081.h18v07.005.2008277204832.hdf F:\mod1\MOD13Q1.A2001081.h19v07.005.2008277201833.hdf F:\mod1\MOD13Q1.A2001097.h18v07.005.2007017133013.hdf F:\mod1\MOD13Q1.A2001097.h19v07.005.2007017133433.hdf F:\mod1\MOD13Q1.A2001113.h18v07.005.2008283010427.hdf F:\mod1\MOD13Q1.A2001113.h19v07.005.2008283001310.hdf F:\mod1\MOD13Q1.A2001129.h18v07.005.2007026110711.hdf F:\mod1\MOD13Q1.A2001129.h19v07.005.2007026115629.hdf F:\mod1\MOD13Q1.A2001145.h18v07.005.2007063072739.hdf F:\mod1\MOD13Q1.A2001145.h19v07.005.2007063084136.hdf F:\mod1\MOD13Q1.A2001161.h18v07.005.2007035101858.hdf F:\mod1\MOD13Q1.A2001161.h19v07.005.2007035102634.hdf F:\mod1\MOD13Q1.A2001177.h18v07.005.2007168002527.hdf F:\mod1\MOD13Q1.A2001177.h19v07.005.2007168012821.hdf F:\mod1\MOD13Q1.A2001193.h18v07.005.2007040071522.hdf F:\mod1\MOD13Q1.A2001193.h19v07.005.2007040070828.hdf F:\mod1\MOD13Q1.A2001209.h18v07.005.2008223085316.hdf F:\mod1\MOD13Q1.A2001209.h19v07.005.2008223103135.hdf F:\mod1\MOD13Q1.A2001225.h18v07.005.2007050002650.hdf F:\mod1\MOD13Q1.A2001225.h19v07.005.2007050011736.hdf F:\mod1\MOD13Q1.A2001241.h18v07.005.2008279105507.hdf F:\mod1\MOD13Q1.A2001241.h19v07.005.2008279132615.hdf F:\mod1\MOD13Q1.A2001257.h18v07.005.2007066094447.hdf F:\mod1\MOD13Q1.A2001257.h19v07.005.2007066093552.hdf F:\mod1\MOD13Q1.A2001273.h18v07.005.2008284210038.hdf F:\mod1\MOD13Q1.A2001273.h19v07.005.2008284202649.hdf F:\mod1\MOD13Q1.A2001289.h18v07.005.2007075051352.hdf F:\mod1\MOD13Q1.A2001289.h19v07.005.2007075052507.hdf F:\mod1\MOD13Q1.A2001305.h18v07.005.2008288095803.hdf F:\mod1\MOD13Q1.A2001305.h19v07.005.2008288185842.hdf F:\mod1\MOD13Q1.A2001321.h18v07.005.2007081174259.hdf F:\mod1\MOD13Q1.A2001321.h19v07.005.2007081173820.hdf F:\mod1\MOD13Q1.A2001337.h18v07.005.2008289221905.hdf F:\mod1\MOD13Q1.A2001337.h19v07.005.2008290083318.hdf F:\mod1\MOD13Q1.A2001353.h18v07.005.2007110014645.hdf F:\mod1\MOD13Q1.A2001353.h19v07.005.2007110015634.hdf )

INPUT_FILENAME = F:\mod1\TmpMosaic.hdf

SPECTRAL_SUBSET = ( 1 1 )

ORIG_SPECTRAL_SUBSET = ( 0 1 0 0 0 0 0 0 0 0 0 1 )

SPATIAL_SUBSET_TYPE = INPUT_LAT_LONG

SPATIAL_SUBSET_UL_CORNER = ( 19.999999998 0.0 ) SPATIAL_SUBSET_LR_CORNER = ( 9.999999999 20.308532236 )

OUTPUT_FILENAME = F:\mod1\MOD13Q1.A2001001.tif

RESAMPLING_TYPE = NEAREST_NEIGHBOR

OUTPUT_PROJECTION_TYPE = AEA

OUTPUT_PROJECTION_PARAMETERS = ( 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 )

DATUM = WGS84

OUTPUT_PIXEL_SIZE = 1000 `

  • If you're willing to use Python and gdal, my notes might be of use. – Jose Mar 22 '17 at 11:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.