[Top] [Prev] [Next] [Bottom]

GRattrinfo/mgatinf

int32 GRattrinfo(int32 [ri, gr]_id, int32 attr_index, char *name, int32 *data_type, int32 *length)
[ri, gr]_id

IN:

Raster image or GR dataset identifier of the target object

attr_index

IN:

Index of the attribute

name

OUT:

Buffer for the name of the attribute

data_type

OUT:

Data type of the attribute

length

OUT:

Length of the attribute

Purpose

Reads the specified attribute's data type and length.

Return value

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

Example

This example illustrates the use of GRattrinfo in reading the attributes of a general raster image:

     #include "hdf.h"

     int32 ri_id, gr_id, stat, attr_index;
      int32 *data_type, length;
      int32 attr_values[2];
      char name[MAX_GR_NAME];
        ...
      ri_id = GRselect(gr_id, 0);
      stat = GRattrinfo(gr_id, attr_index, name, data_type,
           length);
      stat = GRgetattr(ri_id, attr_index, attr_values)
       ...
 
FORTRAN

integer function mgatinf([ri, gr]_id, attr_index, name, data_type, length)

integer [ri, gr]_id, data_type, num_attrs, length

character* (*) name



[Top] [Prev] [Next] [Bottom]

hdfhelp@ncsa.uiuc.edu
HDF User's Reference Manual, Draft 06/09/97, NCSA HDF Development Group.