[gdal-dev] python bindings: 2x ds.WriteRaster?
even.rouault at mines-paris.org
Tue Nov 29 05:57:19 EST 2011
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()
> There is no ds.WriteArray()
actually, there's no WriteArray() at dataset level. It exists only at band
> 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?
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.
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
More information about the gdal-dev