sif_header Struct Reference

A struct for storing a SIF file header in memory. More...

#include <sif-io.h>


Data Fields

char magic_number [SIF_MAGIC_NUMBER_SIZE]
 This field identifies whether the header read from a file is likely to correspond to a SIF file.
long version
 The minimum version of the SIF library needed to read this file.
long width
 The width of the image in pixels.
long height
 The height of the image in pixels.
long bands
 The number of bands of the image.
long n_keys
 The number of keys stored in the meta-data.
long n_tiles
 The number of tiles that comprise this image.
long tile_width
 The width of each tile in pixels.
long tile_height
 The height of each tile in pixels.
long tile_bytes
 The number of bytes required to store a single tile raster. This is equal to tile_width * tile_height * n_bands * data_unit_size.
long n_tiles_across
 The number of tiles across the width of an image.
long data_unit_size
 The number of bytes required to store each pixel.
long user_data_type
 A number that is only read from and written to the SIF file header. It has no meaning to the sif-io functions since sif-io processes images without regard to the data type of the pixels. The caller to the library function can use the field to store an integer that represents the data type of the pixels in the image.
long defragment
 A field that, when nonzero, indicates the file should be defragmented when its closed.
long consolidate
 A field, that when nonzero, indicates that the file should be consolidated when its closed.
long intrinsic_write
 A field, that when nonzero, indicates that when each tile is written, a uniformity check should be performed.
long tile_header_bytes
 The number of bytes needed to store the header for each tile.
long n_uniform_flags
 The number of bytes to store the uniformity flags, i.e. Ceil(number_of_flags / 8).
double affine_geo_transform [6]
 Six doubles representing the affine georeferencing transform parameters.


Detailed Description

A struct for storing a SIF file header in memory.

Warning:
Changing its fields does not result in an immediate change to the header stored in the file to which it points. The file must be flushed with sif_flush or closed with sif_close. Integers are stored with a sign bit in big-endian form.


Field Documentation

double sif_header::affine_geo_transform[6]

Six doubles representing the affine georeferencing transform parameters.

The georeferenced coordinates of the pixel coordinate (Xpixel, Yline) are computed as follows (from GDAL documentation):

  const double *GT = &(hd->affine_geo_transform);
  Xgeo = GT[0] + Xpixel * GT[1] + Yline * GT[2];
  Ygeo = GT[3] + Xpixel * GT[4] + Yline * GT[5];

The transform is set to {0.0, 1.0, 0.0, 0.0, 0.0, 1.0} by default by sif_create so that x and y are just mapped to themselves.

Warning:
Do not edit this field directly. Instead use the sif_set_affine_geo_transform function.

long sif_header::bands

The number of bands of the image.

Warning:
Do not edit this field directly. Changing its value without changing the image layout on disk will make the file unreadable.

long sif_header::consolidate

A field, that when nonzero, indicates that the file should be consolidated when its closed.

This involves performing pixel uniformity checks on each dirty tile during close.

Warning:
Do not edit this field directly. Instead use the sif_set_defragment or sif_unset_defragment functions.

long sif_header::data_unit_size

The number of bytes required to store each pixel.

Warning:
Do not edit this field directly. Changing its value without changing the image layout on disk will make the file unreadable.

Non-square tiles have not been tested.

long sif_header::defragment

A field that, when nonzero, indicates the file should be defragmented when its closed.

Warning:
Do not edit this field directly. Instead use the sif_set_defragment or sif_unset_defragment functions.

long sif_header::height

The height of the image in pixels.

Warning:
Do not edit this field directly. Changing its value without changing the image layout on disk will make the file unreadable.

long sif_header::intrinsic_write

A field, that when nonzero, indicates that when each tile is written, a uniformity check should be performed.

Warning:
Do not edit this field directly. Instead use the sif_set_intrinsic_write or sif_unset_intrinsic_write functions.

char sif_header::magic_number[SIF_MAGIC_NUMBER_SIZE]

This field identifies whether the header read from a file is likely to correspond to a SIF file.

These bytes must equal the string "!**SIF**" or an error will occur when the header is processed by a SIF function. The byte offset of this field is 0.

Warning:
Do not edit this field directly.

long sif_header::n_keys

The number of keys stored in the meta-data.

Warning:
Do not edit this field directly. Instead use the sif_get_meta_data, sif_get_meta_data_binary, sif_set_meta_data, and sif_get_meta_data_binary functions.

long sif_header::n_tiles

The number of tiles that comprise this image.

Warning:
Do not edit this field directly. Changing its value without changing the image layout on disk will make the file unreadable.

long sif_header::n_tiles_across

The number of tiles across the width of an image.

Warning:
Do not edit this field directly. Changing its value without changing the image layout on disk will make the file unreadable.

long sif_header::n_uniform_flags

The number of bytes to store the uniformity flags, i.e. Ceil(number_of_flags / 8).

Warning:
Do not edit this field directly. Changing its value without changing the image layout on disk will make the file unreadable.

long sif_header::tile_bytes

The number of bytes required to store a single tile raster. This is equal to tile_width * tile_height * n_bands * data_unit_size.

Warning:
Do not edit this field directly. Changing its value without changing the image layout on disk will make the file unreadable.

long sif_header::tile_header_bytes

The number of bytes needed to store the header for each tile.

Warning:
Do not edit this field directly. Changing its value without changing the image layout on disk will make the file unreadable.

long sif_header::tile_height

The height of each tile in pixels.

Warning:
Do not edit this field directly. Changing its value without changing the image layout on disk will make the file unreadable.

Non-square tiles have not been tested.

long sif_header::tile_width

The width of each tile in pixels.

Warning:
Do not edit this field directly. Changing its value without changing the image layout on disk will make the file unreadable.

Non-square tiles have not been tested.

long sif_header::user_data_type

A number that is only read from and written to the SIF file header. It has no meaning to the sif-io functions since sif-io processes images without regard to the data type of the pixels. The caller to the library function can use the field to store an integer that represents the data type of the pixels in the image.

Warning:
Do not edit this field directly. Instead use the sif_set_user_data_type function.

long sif_header::version

The minimum version of the SIF library needed to read this file.

Warning:
Do not edit this field directly. Changing the value of this field without a corresponding change to the organization of the file may make it unreadable.

long sif_header::width

The width of the image in pixels.

Warning:
Do not edit this field directly. Changing its value without changing the image layout on disk will make the file unreadable.


The documentation for this struct was generated from the following file:
Generated on Tue Dec 4 11:02:10 2007 for SIF by  doxygen 1.4.7