[gdal-dev] python bindings: 2x ds.WriteRaster?

Even Rouault 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()

line 730

> There is no ds.WriteArray()

actually, there's no WriteArray() at dataset level. It exists only at band
level.

> 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.

>
> Cheers,
> Vincent.
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>




More information about the gdal-dev mailing list