Changes between Version 8 and Version 9 of rfc15_nodatabitmask
- Timestamp:
- Aug 21, 2007, 8:29:11 AM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
rfc15_nodatabitmask
v8 v9 27 27 * GNMF_PER_DATASET(0x02): The mask band is shared between all bands on the dataset. 28 28 * GNMF_ALPHA(0x04): The mask band is actually an alpha band and may have values other than 0 and 255. 29 * GNMF_NODATA(0x08): Indicates the mask is actually being generated from nodata values. 29 30 30 31 == Default Implementation == … … 32 33 The GDALRasterBand class will include a default implementation of !GetMaskBand() that returns one of three default implementations. 33 34 34 * If the band has a nodata value set, an instance of the new GDALNodataMaskRasterBand class will be returned. !Get NullMaskFlags() will return zero (no flags set).35 * If the band has a nodata value set, an instance of the new GDALNodataMaskRasterBand class will be returned. !GetMaskFlags() will return zero (no flags set). 35 36 * 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 GNMF_PER_DATASET and GNMF_ALPHA will be returned in the flags. 36 37 * 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 GNMF_ALL_VALID. … … 41 42 42 43 When a dataset has a normal GDT_Byte alpha (transparency) band that applies, it should be returned as the null mask, but the !GetMaskFlags() method should include GNMF_ALPHA. For processing purposes any value other than 0 should be treated as valid data, though some algorithms will treat values between 1 and 254 as partially transparent. 44 45 == Creating Masks == 46 47 For now there is no explicit API for the creation of masks. The CreateCopy() method for particular format drivers may optionally create a mask in the format specified way if appropriate. Explicit API support for creating masks in formats that support it may be added in the future. 48 49 == PAM == 50 51 The Persistant Auxilary Metadata implementation (GDALPamDataset, GDALPamRasterBand) will not, for the time being, provide a mechanism to capture and store masks for formats that don't have a direct mechanism to support them. This may be added in the future, likely in combination with an explicit API for the creation of masks. 43 52 44 53 == Drivers Updated == … … 67 76 == Testing == 68 77 69 == Issues == 78 The gdalautotest will be extended with the following: 70 79 71 * I haven't filled in how creation of masks works. 72 * I haven't talked about bitmask-via-spill file possibilities for the PAM subsystem. 80 * gcore/mask.py: test default mask implementation for nodata, alpha and all valid cases. 81 * gdriver/jpeg.py: extend with a test for "appended bitmask" case - creation and reading. 82 83 Interactive testing will be done for gdalwarp.