Public Member Functions | Protected Member Functions

# GDALAllValidMaskBand Class Reference

Inheritance diagram for GDALAllValidMaskBand:

List of all members.

## Public Member Functions
| GDALAllValidMaskBand (GDALRasterBand *)
virtual GDALRasterBand * | GetMaskBand ()
| Return the mask band associated with the band.
virtual int | GetMaskFlags ()
| Return the status flags of the mask band associated with the band.
## Protected Member Functions
virtual CPLErr | IReadBlock (int, int, void *)

## Member Function Documentation

GDALRasterBand * GDALAllValidMaskBand::GetMaskBand | ( |  | ) | `[virtual]`

Return the mask band associated with the band.

The GDALRasterBand class includes a default implementation of GetMaskBand() that returns one of four default implementations :

- If a corresponding .msk file exists it will be used for the mask band.
- If the dataset has a NODATA_VALUES metadata item, an instance of the new GDALNoDataValuesMaskBand class will be returned. GetMaskFlags() will return GMF_NODATA | GMF_PER_DATASET.
  Since:
    GDAL 1.6.0
- If the band has a nodata value set, an instance of the new GDALNodataMaskRasterBand class will be returned. GetMaskFlags() will return GMF_NODATA.
- If there is no nodata value, but the dataset has an alpha band that seems to apply to this band (specific rules yet to be determined) and that is of type GDT_Byte then that alpha band will be returned, and the flags GMF_PER_DATASET and GMF_ALPHA will be returned in the flags.
- If neither of the above apply, an instance of the new GDALAllValidRasterBand class will be returned that has 255 values for all pixels. The null flags will return GMF_ALL_VALID.

Note that the GetMaskBand() should always return a GDALRasterBand mask, even if it is only an all 255 mask with the flags indicating GMF_ALL_VALID.

This method is the same as the C function GDALGetMaskBand().

Returns:
  a valid mask band.

Since:
  GDAL 1.5.0

See also:
  http://trac.osgeo.org/gdal/wiki/rfc15_nodatabitmask

Reimplemented from GDALRasterBand.

int GDALAllValidMaskBand::GetMaskFlags | ( |  | ) | `[virtual]`

Return the status flags of the mask band associated with the band.

The GetMaskFlags() method returns an bitwise OR-ed set of status flags with the following available definitions that may be extended in the future:

- GMF_ALL_VALID(0x01): There are no invalid pixels, all mask values will be 255. When used this will normally be the only flag set.
- GMF_PER_DATASET(0x02): The mask band is shared between all bands on the dataset.
- GMF_ALPHA(0x04): The mask band is actually an alpha band and may have values other than 0 and 255.
- GMF_NODATA(0x08): Indicates the mask is actually being generated from nodata values. (mutually exclusive of GMF_ALPHA)

The GDALRasterBand class includes a default implementation of GetMaskBand() that returns one of four default implementations :

- If a corresponding .msk file exists it will be used for the mask band.
- If the dataset has a NODATA_VALUES metadata item, an instance of the new GDALNoDataValuesMaskBand class will be returned. GetMaskFlags() will return GMF_NODATA | GMF_PER_DATASET.
  Since:
    GDAL 1.6.0
- If the band has a nodata value set, an instance of the new GDALNodataMaskRasterBand class will be returned. GetMaskFlags() will return GMF_NODATA.
- If there is no nodata value, but the dataset has an alpha band that seems to apply to this band (specific rules yet to be determined) and that is of type GDT_Byte then that alpha band will be returned, and the flags GMF_PER_DATASET and GMF_ALPHA will be returned in the flags.
- If neither of the above apply, an instance of the new GDALAllValidRasterBand class will be returned that has 255 values for all pixels. The null flags will return GMF_ALL_VALID.

This method is the same as the C function GDALGetMaskFlags().

Since:
  GDAL 1.5.0

Returns:
  a valid mask band.

See also:
  http://trac.osgeo.org/gdal/wiki/rfc15_nodatabitmask

Reimplemented from GDALRasterBand.

The documentation for this class was generated from the following files:

- gdal_priv.h
- gdalallvalidmaskband.cpp

Generated for GDAL by 1.7.1.