[Gdal-dev] GDAL 1.3.0 Beta1 Released

Alessandro Amici lists at b-open-solutions.it
Mon Aug 8 05:14:41 EDT 2005


Frank,

to correct my initial posting i actually take a reference to a band with 
GetBand(1) and not to the dataset it is attached to.

On Sunday 07 August 2005 23:56, Frank Warmerdam wrote:
> This does sound like something is corrupt in the GDALRasterBand
> (or GDALDataset).

any chance that the dataset reference count goes to zero if i only bring along 
the band object...

[trying...]

BINGO!

if i carry along a reference to the original dataset together the reference to 
that raster band everything works ;)

so, from the look of it the ReadAsArray method uses something from the dataset 
c++ object, but the 'pythonic' band object doesn't take a 'pythonic' 
reference to its parent dataset that gets garbage collected. is it right?

> Anything odd about your platform? (ie. 64bit or non-x86).

nope, just a dual-cpu: debian i386 k7-smp. nothing fancy.

i'm going to work around this problem, for now.

i'll try to send you a minimal sample of code that demonstrate the problem.

cheers,
alessandro

-- 
B-Open Solutions srl - http://www.bopen.it/



More information about the Gdal-dev mailing list