[Back to Interface] [Next]

GRattrinfo/mgatinf

intn GRattrinfo(int32 [obj]_id, int32 attr_index, char *name, int32 *data_type, int32 *count)

[obj]_id IN:

Raster image identifier (ri_id), returned by GRcreate or GRselect, or GR interface identifier (gr_id), returned by GRstart

attr_index IN:

Index of the attribute

name OUT:

Buffer for the name of the attribute

data_type OUT:

Data type of the attribute

count OUT:

Number of attribute values

Purpose

Retrieves information about an attribute.

Return value

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

Description

GRattrinfo retrieves the name, data type, and number of values of the attribute, specified by its index, attr_index, for the data object identified by the parameter obj_id. The name is stored in the parameter name, the data type is stored in the parameter data_type, and the number of values is stored in the parameter count. If the value of any of the output parameters is NULL, the corresponding information will not be retrieved.

The value of the parameter attr_index can be obtained using GRfindattr, GRnametoindex or GRreftoindex, depending on available information. Valid values of attr_index range from 0 to the total number of attributes attached to the object - 1. The total number of attributes attached to the file can be obtained using the routine GRfileinfo. The total number of attributes attached to an image can be obtained using the routine GRgetiminfo .

FORTRAN

integer function mgatinf([obj]_id, attr_index, name, data_type, count)

integer [obj]_id, data_type, attr_index, count

character*(*) name



[Back to Interface] [Next]

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