Changes between Version 1 and Version 2 of rfc14_imagestructure


Ignore:
Timestamp:
May 17, 2007, 1:59:53 PM (17 years ago)
Author:
warmerdam
Comment:

Preliminary draft.

Legend:

Unmodified
Added
Removed
Modified
  • rfc14_imagestructure

    v1 v2  
     1
     2
     3
    14= RFC 14: Image Structure Metadata =
    25
     
    710== Summary ==
    811
     12This RFC attempts to formalize the semantics of the "IMAGE_STRUCTURE" domain of metadata.  This metadata domain is used to hold structural information about image organization that would not normally be carried with an image when translated into another format.  The IMAGE_STRUCTURE metadata may occur on the GDALDataset or on individual bands, and most items are meaningful in both contexts.  When items like NBITS are found on the dataset it is assumed they apply to all bands of that dataset.
     13
     14== IMAGE_STRUCTURE items ==
     15
     16 COMPRESSION::
     17   The compression type used for this dataset or band.  There is no fixed catalog of compression type names, but where a given format includes a COMPRESSION creation option, the same list of values should be used here as there.
     18
     19 NBITS::
     20   The actual number of bits used for this band, or the bands of this dataset.  Normally only present when the number of bits is non-standard for the datatype, such as when a 1 bit TIFF is represented through GDAL as GDT_Byte.
     21
     22 INTERLEAVE::
     23   This only applies on datasets, and the value should be one of PIXEL, LINE or BAND.  It can be used as a data access hint.
     24
     25 PIXEL_INTERPRETATION::
     26   This may appear on a GDT_Byte band (or the corresponding dataset) and have the value SIGNEDBYTE to indicate the unsigned byte values between 128 and 255 should be interpreted as being values between -128 and -1 for applications that recognise the SIGNEDBYTE type.
     27
     28== Compatability Issues ==
     29
     30This RFC has two changes from existing practise that may cause compatability issues:
     31
     32 1. Traditionally the NBITS metadata appeared in the default metadata domain on datasets, instead of in the IMAGE_STRUCTURE domain.
     33 2. Traditionally the COMPRESSION metadata appeared only on the dataset, never one the band.
     34 
     35I am only aware of one application previously making systematic use of these items, and it will be updated to reflect the new usage as GDAL 1.5.0 is adopted.
     36
     37== Development ==
     38
     39Beyond adopting the definition for the semantics of the IMAGE_STRUCTURE metadata, the following development steps will be taken:
     40
     41 1. The PNG, GTiff, NITF and EHdr drivers will be updated to place NBITS in the IMAGE_STRUCTURE metadata domain.
     42 2. The HFA driver will be updated to return NBITS metadata.
     43 3. The HFA, GTiff, JP2KAK, ECW, JPEG, and PNG drivers will be updated to return INTERLEAVE metadata.
     44 4. The HFA and GTiff drivers will be updated to return PIXEL_INTERPRETATION metadata.
     45
     46The development will be done by Frank Warmerdam in trunk in time for GDAL/OGR 1.5.0 release.
     47
     48== Notes ==
     49
     50The gdalinfo utility already reports IMAGE_STRUCTURE metadata when it is available.
     51
     52Some work will also be done to make the GTiff, and HFA drivers CreateCopy() methods check the source for NBITS and PIXEL_INTERPRETATION metadata to create specialized output files types (NBITS already done for GTiff).
     53
     54== Concerns ==
     55
     56I'm really not sure PIXEL_INTERPRETATION is the right approach to pseudo-supporting a signed byte type as GDT_Byte.  It might be better to have drivers treat this data as GDT_Int16, and set NBITS to 8 as a special clue to the restricted nature of the data.
     57