[gdal-dev] gdal_calc.py: produce median raster

Simen Langseth simlangen at gmail.com
Mon Nov 24 23:33:07 PST 2014


Dear Marius Jigmond:

Thanks for your attempt.

Unfortunately, it is producing 3 band outfile, rather than 1 band median
image.

I could not figure out what this code computed, all the resulted 3 bands
images are also different.

I hope someone can help me.

On Tue, Nov 25, 2014 at 12:09 PM, Marius Jigmond <mariusjigmond at hotmail.com>
wrote:

> Does the following work:
>
> gdal_calc.py -A infile --allBands=A --outfile=outfile --calc="median(A)"
>
>
> ------------------------------
> Date: Mon, 24 Nov 2014 19:14:06 +0900
> From: simlangen at gmail.com
> To: gdal-dev at lists.osgeo.org
> Subject: [gdal-dev] gdal_calc.py: produce median raster
>
>
> 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
> gdal-dev at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20141125/e6035205/attachment.html>


More information about the gdal-dev mailing list