[Gdal-dev] Nodata bitmasks / null processing
Frank Warmerdam
warmerdam at pobox.com
Tue Aug 7 11:54:20 EDT 2007
Simon Perkins wrote:
> So, would the default implementation return a universal RasterBand
> derived class that implements IReadBlock() and IWriteBlock() in terms of
> the underlying format RasterIO() method in conjunction with NODATA values?
Simon,
I think this is quite plausible, with the default implementation of
GetBitmask() returning NULL if there is no nodata value set.
> One thing though - if the GetBitmask() method is a RasterBand method,
> then presumably invoking that method on a RasterBand returned by
> GetBitmask() wouldn't make sense. Either this could just raise some kind
> of error. Or we could make GetBitmask() a method of the Dataset instead.
It is up to the drivers creating custom classes for their GetBitmask()
result to ensure those don't in turn return bitmasks, and don't have
a nodata value set on them.
I think GetBitmask() being a method on GDALRasterBand, instead of
the dataset is important as it clearly establishes the association.
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?
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