Hi Simen, Try this:
gdal_calc.py -A rgb.tif --outfile ouput.tif --calc "median(A, axis=0)" The "axis=0" parameter is to perform a median calculation along the first dimension, which is the band dimension. Lean more here: http://docs.scipy.org/doc/numpy/reference/generated/numpy.median.html -Mike On 24 November 2014 at 23:14, Simen Langseth <[email protected]> wrote: > I have one GeoTiff file with 3 bands. I want to produce a raster file > computing pixel wise median value for the three raster bands. How can I do > that? > > I tried as follows: > > gdal_calc.py -A infile --allBands --outfile outfile --calc median(A) > > But could not get any out file. _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
