<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 11/29/2011 11:57 AM, Even Rouault wrote:
    <blockquote cite="mid:1322564239.4ed4ba8feb2da@webmail.free.fr"
      type="cite">
      <pre wrap="">Selon Vincent Schut <a class="moz-txt-link-rfc2396E" href="mailto:schut@sarvision.nl">&lt;schut@sarvision.nl&gt;</a>:

</pre>
      <blockquote type="cite">
        <pre wrap="">Hi list,

Remembering a recent message mentioning the existence of both
'ReadArray' and 'WriteArray' on the dataset level of the python swig
bindings, I opened up my gdal.py (svn rev. 23438), and found this:

There is a ds.ReadAsArray()
</pre>
      </blockquote>
      <pre wrap="">
line 730

</pre>
      <blockquote type="cite">
        <pre wrap="">There is no ds.WriteArray()
</pre>
      </blockquote>
      <pre wrap="">
actually, there's no WriteArray() at dataset level. It exists only at band
level.</pre>
    </blockquote>
    <br>
    Ah. It was your own replay in the recent thread 'clipping an image
    via python api problems' that made me thinks this. I quote:<br>
    "<i>Le lundi 28 novembre 2011 07:44:26, Chaitanya kumar CH a écrit :
    </i>
    <blockquote type="cite" style="font-style: italic; color: #666666;">
      <pre wrap=""><i>I should have said that you need to copy all bands 'individually'.
</i></pre>
    </blockquote>
    <pre wrap=""><i>Well, ReadAsArary() and WriteArray() also exist at the dataset level and will 
read/write all bands.</i>
"

I suppose you meant something different then, no problem.
</pre>
    <blockquote cite="mid:1322564239.4ed4ba8feb2da@webmail.free.fr"
      type="cite">
      <pre wrap="">

</pre>
      <blockquote type="cite">
        <pre wrap="">There are *2* defined functions ds.WriteRaster() (line 730, and line 767
in gdal.py).

Especially the last point is bothering me... What is the intention of
that? Afaik one of those will probably never be called? Should one of
those have had a different name? Is my gdal.py bad?
</pre>
      </blockquote>
      <pre wrap="">
Your gdal.py is fine, but yes, it is a bit confusing to have 2 definitions. The
last one that overrides the first one will be used. But I agree this could be
fixed to avoid the confusion.</pre>
    </blockquote>
    OK, so the last one is the 'valid' one. Good to know.<br>
    <br>
    Thank for the reply.<br>
    <br>
    Vincent Schut.<br>
    <blockquote cite="mid:1322564239.4ed4ba8feb2da@webmail.free.fr"
      type="cite">
      <pre wrap="">

</pre>
      <blockquote type="cite">
        <pre wrap="">
Cheers,
Vincent.
_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/gdal-dev">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a>

</pre>
      </blockquote>
      <pre wrap="">

</pre>
    </blockquote>
  </body>
</html>