[Gdal-dev] Nodata bitmasks / null processing

Simon Perkins sy at perkins.net
Tue Aug 7 15:47:17 EDT 2007


Frank Warmerdam wrote:
> Simon Perkins wrote:
>>> I am wondering, a bit how we would represent the case where there is
>>> one nodata bitmask for a whole dataset.  That it, one mask applying
>>> to all bands.  Perhaps all bands just return the same object?
>>
>> Since users might be deleting the Bitmask RasterBand when they're 
>> done with it, it probably shouldn't be _exactly_ the same object, but 
>> it could be a copy of a stub that shares a lot of the underlying 
>> state / cache, etc. Might be worth adding a method  "BitmaskType()" 
>> method returning NONE, ONE_PER_DATASET, or ONE_PER_BAND , or similar. 
>> This would also subsume the "HasBitmask()" method.
>
> Simon,
>
> Just as a datasource "owns" it's bands, and a band "owns" it's overviews,
> I believe the band should "own" it's bitmask band object.  So the
> application should never try to delete the bitmask band object.

Ah yes -  forgot that one doesn't delete GDALRasterBand objects 
explicitly, only the GDALDataset...

Oops,

Simon





More information about the Gdal-dev mailing list