Changes between Version 8 and Version 9 of rfc15_nodatabitmask


Ignore:
Timestamp:
Aug 21, 2007, 8:29:11 AM (17 years ago)
Author:
warmerdam
Comment:

Another big update pass.

Legend:

Unmodified
Added
Removed
Modified
  • rfc15_nodatabitmask

    v8 v9  
    2727 * GNMF_PER_DATASET(0x02): The mask band is shared between all bands on the dataset.
    2828 * 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. 
    2930
    3031== Default Implementation ==
     
    3233The GDALRasterBand class will include a default implementation of !GetMaskBand() that returns one of three default implementations. 
    3334
    34  * If the band has a nodata value set, an instance of the new GDALNodataMaskRasterBand class will be returned.  !GetNullMaskFlags() 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).
    3536 * 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.
    3637 * 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.
     
    4142
    4243When 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
     47For 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
     51The 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.
    4352
    4453== Drivers Updated ==
     
    6776== Testing ==
    6877
    69 == Issues ==
     78The gdalautotest will be extended with the following:
    7079
    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
     83Interactive testing will be done for gdalwarp.