[Gdal-dev] Nodata bitmasks / null processing

Frank Warmerdam warmerdam at pobox.com
Tue Aug 7 15:11:02 EDT 2007


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.

Nevertheless, the BitmaskType() might still be worthwhile.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org




More information about the Gdal-dev mailing list