[gdal-dev] python bindings: 2x ds.WriteRaster?
Even Rouault
even.rouault at mines-paris.org
Tue Nov 29 13:14:30 EST 2011
Le mardi 29 novembre 2011 12:03:26, Vincent Schut a écrit :
> On 11/29/2011 11:57 AM, Even Rouault wrote:
> > Selon Vincent Schut<schut at sarvision.nl>:
> >> 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()
> >
> > line 730
> >
> >> There is no ds.WriteArray()
> >
> > actually, there's no WriteArray() at dataset level. It exists only at
> > band level.
>
> Ah. It was your own replay in the recent thread 'clipping an image via
> python api problems' that made me thinks this. I quote:
> "/Le lundi 28 novembre 2011 07:44:26, Chaitanya kumar CH a écrit : /
>
> > /I should have said that you need to copy all bands 'individually'.
> > /
>
> /Well, ReadAsArary() and WriteArray() also exist at the dataset level and
> will read/write all bands./
> "
>
> I suppose you meant something different then, no problem.
No, in my first replay, as I knew that ReadAsArray() existed, I also naively
assumed that WriteArray() existed at the dataset level, but did not check...
Sorry for the confusion
More information about the gdal-dev
mailing list