[gdal-dev] Gdal_calc.py with more than 26 input files

Graeme B. Bell graeme.bell at nibio.no
Thu Jul 23 04:34:16 PDT 2015


On 17 Jul 2015, at 12:09, <gdal-dev-request at lists.osgeo.org> <gdal-dev-request at lists.osgeo.org> wrote:

> Have a look at this gis.stackexchange question:
> http://gis.stackexchange.com/questions/149006/does-gdal-calc-only-support-26-input-raster-files-at-a-time
> 
> So, what users can do if they have more than 26 input files?


(in case someone finds this via Google)

1. It's frequently possible to split up the underlying calculation into subcalculations, that each need a subset of the files that fits under the threshhold of 26 files. 
e.g. A+B+C+D+E+F = (A+B+C)   +  (D+E+F)

Downside is, it takes longer (though parallelising can reduce the pain).
Upside is, you get more insight into intermediate results. 

2. If you're talking tens of thousands of files, another option is to give up and put the rasters into postgis raster and use a mapalgebra operation.
That's really not ideal, of course, in terms of performance, but it may be more helpful in terms of structuring all that data.

Graeme Bell



More information about the gdal-dev mailing list