Geoscience Reference
In-Depth Information
3.5 Raster Data Encoding
There are three principalmethods that can be used to encodemulti-band images tofile:
interleaved by pixel (BIP);
line (BIL);
band sequential (BAND or BSQ).
In the schematic overview in Fig. 3.5 , it is shown how the image in Fig. 3.5 a can be
written to file. Imagine pixels being written sequentially to disk as a one dimensional
array. For a band sequential coding, not all encoding schemes are equally suited for
processing than others, depending on how the image will be accessed. By default
TIFF files are created as BIP, as it is supported by most image processing software.
However, if a large number of pixels in a single band should be accessed at once (e.g.,
reading/writing line per line), it is better to avoid BIP encoding. In addition to BIP,
BIL and BAND encoding, GeoTIFF supports tiled encoding. In that case the image
is first divided into tiles and then encoded band sequentially. For instance, Fig. 3.5 b
represents the coding of the first tile for the image shown in Fig. 3.4 . As outlined in
the TIFF specification, 5 the standard method is to write an image in strips (stripped
as opposed to tiled encoding). It is motivated that high resolution images can be
accessed more efficiently—and compression tends to work better—if the image is
tiled in roughly square blocks (see also Sect. 5.5 ) .
Interleave and tiling options can be set for most GDAL related commands by
using the options -co INTERLEAVE=BAND (for band sequential data storage)
and -co TILED=YES respectively. Notice that for ENVI image formats, band
interleaved images should be createdwith -co INTERLEAVE=BSQ instead of -co
INTERLEAVE=BAND .
5 http://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf
 
Search WWH ::




Custom Search