2

Newbie, tasked with something I think can be done this way, but not sure how to get it to work.

It seems quite simple. I want to subtract a sequence of rasters (daily data): one day from the previous. day100-day99; dayy99-day98; day98-day97 and so on, with file names that appropriately label what each output is.

  • If you don't wan't to use python you should ckeck out the Model Builder. – Leo Apr 9 at 9:12
1

This is actually fairly easy to do. I think others might have an easier solution but this is how I do it:

  1. Go to the Processing tab -> Graphical Modeler

enter image description here 2. Under inputs, add raster layer two times. Name them "Day_Future" and "Day_Past". Make sure both are mandatory.

enter image description here

  1. Under algorithms, search for raster calculator and add it.

enter image description here

  1. Enter the parameters in the raster calculator window. Set the expression as "Day_Future@1" - "Day_Past@1". Set the reference layer as Day_Future and call the Output "Difference".

enter image description here

  1. Your model should look something like this. You can save this model if you would like to use it again in the future. Or you can hit the green run button to launch it.

enter image description here

  1. When you hit run, this window will pop up. Hit "run as a batch process"

enter image description here

  1. Select all your grids in the first two columns from either the open layers or from your computer. You can select all the grids and that should make it easier to fill in this table.

enter image description here

  1. Under the difference column, set your file name as "Diff_" and leave the file type as TIF. Hit save.

enter image description here enter image description here

  1. Thats it, your table should be filled in. The file name should be filled in automatically. This can be editted later by either QGIS or other software. Hit Run and you are done :)

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.