I'm new to these batch thing and I badly need your help. There are 4 to 5 projected images in one day. Let's say I have all the projected images for 3 days. For day 1, the file name are:
T2010232034000.L2.Tera.tif
T2010232035000.L2.Tera.tif
T2010232036000.L2.Tera.tif
T2010232037000.L2.Tera.tif
For day 2, the file name are:
T2010233045000.L2.Tera.tif
T2010233046000.L2.Tera.tif
T2010233047000.L2.Tera.tif
T2010233048000.L2.Tera.tif
T2010233049000.L2.Tera.tif
For day 3, the file name are:
T2010234050000.L2.Tera.tif
T2010234051000.L2.Tera.tif
T2010234052000.L2.Tera.tif
T2010234053000.L2.Tera.tif
T2010234054000.L2.Tera.tif
How will I merge all the images that are for day 1, for day 2 and for day 3 and save each merged images to a new directory leaving only the T/datayear/juliandate as the filename for each day. Merging files is easy but doing it in batch and merging based on the images per day is making me crazy.
Note: T2010232034000 = Terra/Data Year/Julian Date/HH/MM/SS
Here is the script I used in merging the files:
gdal_merge.py -n 0 -a_nodata -32767 -of GTiff -o output_directory input_directory_in1.tif input_directory_in2.tif input_directory_in3.tif input_directory_in4.tif/input_directory_in5.tif