Re: [gdal-dev] ReadAsArray misbehaving...

2010-09-06 Thread Riaan van den Dool
Even Thanks for pointing that out. I have now been able to solve that problem by keeping the dataset in scope... Riaan On Fri, Sep 3, 2010 at 7:52 PM, Even Rouault wrote: > Riann, > > hum, I think you've hit a classical problem with the use of the GDAL python > bindings. The root of your proble

Re: [gdal-dev] ReadAsArray misbehaving...

2010-09-03 Thread Even Rouault
Riann, hum, I think you've hit a classical problem with the use of the GDAL python bindings. The root of your problem is likely the following line: reader = RasterReaderWriter(gdal.Open(iFilename).GetRasterBand(1)) Currently the GDAL python bindings do a poor job with life cycle management of

Re: [gdal-dev] ReadAsArray misbehaving...

2010-09-03 Thread Riaan van den Dool
Thanks for the suggestion. I have tried: tileRaster = self.raster.ReadAsArray(xoff=offsetX, yoff=offsetY, win_xsize=width, win_ysize=height) and tileRaster = self.raster.ReadAsArray(xoff=offsetX, yoff=offsetY, buf_xsize=width, buf_ysize=height) but the result is something like: (array([],

[gdal-dev] ReadAsArray misbehaving...

2010-09-03 Thread Riaan van den Dool
I have recently started a new open-source project that will use gdal extensively, named scikits.eartho. The vision is to implement some advanced algorithms and ideas that we develop and work with at the South African Satellite Applications Centre (SAC) for use in Python (SciPy). I am experiencing