Excellent. Thanks folks for your helpful replies<div><br></div><div>Cheers,</div><div> Graeme<br><br><div class="gmail_quote">On Tue, Nov 29, 2011 at 6:01 AM, Even Rouault <span dir="ltr"><<a href="mailto:even.rouault@mines-paris.org">even.rouault@mines-paris.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Le lundi 28 novembre 2011 07:44:26, Chaitanya kumar CH a écrit :<br>
<div class="im">> I should have said that you need to copy all bands 'individually'.<br>
<br>
</div>Well, ReadAsArary() and WriteArray() also exist at the dataset level and will<br>
read/write all bands.<br>
<br>
See :<br>
<br>
$ python<br>
Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)<br>
[GCC 4.4.3] on linux2<br>
Type "help", "copyright", "credits" or "license" for more information.<br>
>>> from osgeo import gdal<br>
d = gdal.Open('../autotest/gcore/data/rgbsmall.tif')<br>
>>> d.ReadAsArray()<br>
array([[[ 0, 0, 0, ..., 84, 89, 92],<br>
[ 0, 0, 0, ..., 104, 94, 90],<br>
[ 0, 0, 0, ..., 95, 96, 81],<br>
...,<br>
[ 0, 0, 1, ..., 18, 43, 34],<br>
[ 0, 0, 0, ..., 18, 22, 21],<br>
[ 0, 0, 0, ..., 12, 15, 14]],<br>
<br>
[[ 0, 0, 0, ..., 124, 138, 146],<br>
[ 0, 0, 0, ..., 145, 141, 139],<br>
[ 0, 0, 0, ..., 136, 140, 125],<br>
...,<br>
[ 0, 0, 1, ..., 46, 67, 54],<br>
[ 0, 0, 0, ..., 43, 42, 39],<br>
[ 0, 0, 0, ..., 37, 35, 32]],<br>
<br>
[[ 0, 0, 0, ..., 28, 31, 34],<br>
[ 0, 0, 0, ..., 49, 39, 32],<br>
[ 0, 0, 0, ..., 42, 43, 27],<br>
...,<br>
[ 0, 0, 1, ..., 50, 71, 61],<br>
[ 0, 0, 0, ..., 48, 51, 51],<br>
[ 0, 0, 0, ..., 44, 46, 46]]], dtype=uint8)<br>
</blockquote></div><br></div>