Dear Simen,
You can refer to each band explicitly using the --A_band option.
Try something like this
gdal_calc.py -A infile --A_band 1 -B infile --B_band 2 -C infile --C_band 3
--outfile outfile --calc median(A,B,C)
- Chris
*Dr Chris Yesson*
*Institute of Zoology, Zoological Society of London
Tom,
I have just run your code exactly as you sent it (except for output
path), with python 2.5.2 ang gdal 1.8.1. The ouput file appears in
order (gdalinfo output below). The file opens and displays normally in
qgis trunk v 1.8.
- Chris
Gdalinfo output
Driver: GTiff/GeoTIFF
Files: output.tif
in.
I would be happy to provide a bit of support for this code and weave in
small changes if anyone can suggest improvements or find bugs.
Here is a version of my code with the disclaimer that Howard suggested.
http://static.zsl.org/files/gdal-calc-1218.py
- Chris
Dr Chris Yesson
Institute of Zo
what I would need to do to get it into the main
scripts?
Many thanks
- Chris
Dr Chris Yesson
Postdoctoral Researcher
Institute of Zoology
Zoological Society of London
Regent's Park
London NW1 4RY
020 7449 6267
http://www.zsl.org/chrisyesson/ <http://www.zsl.org/chrisyesson/>