I have 130 rasters in a folder and I would like to create a new raster containing the sum of the 130 raster cell values. How can I do this?
You can us
gdal_calc.py in a for loop. First read all the files name, then use:
gdal_calc.py -A input1.tif -B input2.tif --outfile=result.tif --calc="A+B"
And then in a loop:
gdal_calc.py -A inputX.tif -B result.tif --outfile=result.tif --calc="A+B"
inputX.tifis the current file you are looping over, so your loop should start at
input3 since the first two have already been summed to create