[Back to Interface] [Prev] [Next]

GRgetchunkinfo/mggichnk

intn GRgetchunkinfo(int32 ri_id, HDF_CHUNK_DEF *cdef, int32 *flag)

ri_id IN:

Raster image identifier returned by GRcreate or GRselect

C only:

cdef OUT:

Pointer to the chunk definition

flag OUT:

Pointer to the compression flag

Fortran only:

dim_length OUT:

Array of chunk dimensions

flag OUT:

Compression flag

Purpose

Retrieves chunking information for a raster image.

Return value

Returns SUCCEED (or 0) if successful and FAIL (or -1) otherwise.

Description

GRgetchunkinfo retrieves chunking information about the raster image identified by the parameter ri_id into the parameters cdef and flags in C, and into the parameters dim_length and flag in Fortran. Note that only chunk dimensions are retrieved, compression information is not available.

The value returned in the parameter flag indicates if the raster image is not chunked, chunked, or chunked and compressed. The following table shows the possible values of the parameter flag and the corresponding characteristics of the raster image.

Values of flag in C
Values of flag in Fortran
Raster Image Characteristics
HDF_NONE -1 Not chunked
HDF_CHUNK 0 Chunked and not compressed
HDF_CHUNK | HDF_COMP 1 Chunked and compressed with either the run-length encoding (RLE), Skipping Huffman or GZIP compression algorithms

In C, if the raster image is chunked and not compressed, GRgetchunkinfo fills the array chunk_lengths in the union cdef with the values of the corresponding chunk dimensions. If the raster image is chunked and compressed, GRgetchunkinfo fills the array chunk_lengths in the structure comp of the union cdef with the values of the corresponding chunk dimensions. Refer to the page on GRsetchunk in this manual for specific information on the union HDF_CHUNK_DEF. In Fortran, chunk dimensions are retrieved into the array dim_length. If the chunk length for each dimension is not needed, NULL can be passed in as the value of the parameter cdef in C.

FORTRAN

integer function mggichnk(ri_id, dim_length, flag)

integer ri_id, dim_length, flag



[Back to Interface] [Prev] [Next]

hdfhelp@ncsa.uiuc.edu
HDF Reference Manual - 07/29/98, NCSA HDF Development Group.