1

I have a batch of about 50 landsat 8 geotiff scenes that I want to process in QGIS to compare them. Basically, I need to make simple band math and change color scales.

Is there a way to make something equivalent to an excel macro/vba, or other repetition solution?

0

You could do basic calculations with gdal_calc.py:

gdal_calc.py -A input1.tif -B input2.tif --outfile=result.tif --calc="A+B"

Not sure if it's possible with multiple bands etc.

With gdaldem you can create scales by using the mode color-relief. Basically you create a text file for your color scales and then run gdaldem referring to that text file.

gdaldem color-relief imput.tif scale.txt output.tif
  • thanks! I am not very familiar with python but I will try to follow your clue and see if I can do it that way. Thanks! – Ana Oliveira Oct 13 '17 at 18:08
  • You don't need to know python to run this. gdal_calc.py just happens to be a python script. – oskarlin Oct 13 '17 at 18:10

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.