[Qgis-user] Amal Kar - India - Batch processing of 5 stacks of raster files, using GDAL Raster Calculator

Amal Kar akarcaz50 at gmail.com
Mon Feb 12 00:57:20 PST 2024


Dear Community Members,
I am currently trying to use QGIS (ver. 3.18; Zurich stand alone) for batch
processing of a few thousand raster image files (geotiff) on Modis surface
reflectance data (UInt16) in 5 different stacks for any year (each stack
containing >50 files). I wanted to make simple calculations on the pixels
(e.g., A+B+C+D+E; or ((A+B)*100)/((C+D+E)*10)....etc.), where A, B, C, D, E
are the "Input Layers", each having a single raster band (gray scale,
providing pixel values).
Now, for the first input, "Input Layer A", i click on "Autofill", and then
on "Select files" to insert the first stack of my dataset (which occupy row
2 to say 51 in col.1). Then in the 2nd col., "Number of raster band for A,
i find that the system automatically senses the images and puts "Band 1
(Gray) for all the files selected in col.1.
Next, for the second stack of my dataset in "Input Layer B", i follow the
same method, but when i select the second set of files these go to row 51
downward. For subsequent Input Layers C, D & E, the files occupy
progressively lower rows below. I tried to circumvent the problem by
clicking on "Add all files in the directory", under "Autofill", but the
files always go to the row below the last one for the previous Input Layer.
I found that if i click at row 2 of "Input Layer B, etc." i can place the
first file of my next stack, and then do the same in the subsequent rows of
"Input Layer B". BUT, this is too tiring and unrealistic for any batch
processing, especially when each dataset consists of >100 files.
Unless the files for different stacks are at the same consecutive rows of
the Input Layers, i can not do the raster calculations.
I do not know if i am missing something while clicking on the items under
"Autofill", or if this is a glitch in the system of batch processing.
Kindly help, if possible, for a simple clickable solution on the Batch
Processing window as it appears. Since i am not very conversant with the
complex algorithms, i may not be able to key in expressions for inputting
the files.
I find, though, that otherwise the batch processing tool is quite fast and
accurate for my geotiff files. I would like to use it.
Your kind help will be very much appreciated.
With Kind regards,
amal kar.
---- ------ ----------- ------------
-- 
Dr. Amal Kar
Former Principal Scientist and Head, Division of Natural Resources &
Environment,
Central Arid Zone Research Institute, Jodhpur 342003, India
A-1/6, Baitalik Housing Society, KMDA Housing Complex,
Baghajatin (Near Hiland Park),
KOLKATA 700 094, India
Email: akarcaz50 at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20240212/27fca7b4/attachment.htm>


More information about the QGIS-User mailing list