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

2014-11-26 Thread Pieter Kempeneers
Simen, In case you can not find a solution with gdal_calc.py, you could try to use pkfilter from pktools (http://pktools.nongnu.org). Once installed (currently under Linux only), you can produce your median raster as follows: pkfilter -i infile -o outfile -dz 1 -f median The option -dz 1 indicat

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

2014-11-26 Thread Mike Toews
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 -Mik

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

2014-11-25 Thread Marius Jigmond
re results. -marius Date: Tue, 25 Nov 2014 17:56:46 +0900 From: simlan...@gmail.com To: chris.yes...@ioz.ac.uk CC: gdal-dev@lists.osgeo.org Subject: Re: [gdal-dev] gdal_calc.py: produce median raster Dear Dr Chris Yesson Thanks for your quick response. I got the following error: ValueError: The truth v

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

2014-11-25 Thread Simen Langseth
gt;>> >>> I hope someone can help me. >>> >>> On Tue, Nov 25, 2014 at 12:09 PM, Marius Jigmond < >>> mariusjigm...@hotmail.com> wrote: >>> >>>> Does the following work: >>>> >>>> gdal_calc.py -A infile --al

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

2014-11-25 Thread Chris Yesson
t; 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: simlan...@g

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

2014-11-24 Thread Simen Langseth
t;> >> gdal_calc.py -A infile --allBands=A --outfile=outfile --calc="median(A)" >> >> >> -- >> Date: Mon, 24 Nov 2014 19:14:06 +0900 >> From: simlan...@gmail.com >> To: gdal-dev@lists.osgeo.org >> Subject: [gda

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

2014-11-24 Thread Simen Langseth
, Marius Jigmond 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: simlan...@gmail.com > To: gdal-dev@lists.osgeo.o

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

2014-11-24 Thread Marius Jigmond
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: simlan...@gmail.com To: gdal-dev@lists.osgeo.org Subject: [gdal-dev] gdal_calc.py: produce median raster I have one GeoTiff file with 3 bands.

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

2014-11-24 Thread Simen Langseth
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.