|
Purpose
|
Assigns an attribute to a raster image or a file. |
|
Return value
|
Returns SUCCEED (or 0) if successful and FAIL (or -1) otherwise. |
|
Description
|
GRsetattr attaches the attribute to the object specified by the parameter obj_id. The attribute is defined by its name, attr_name, data type, data_type, number of attribute values, count, and the attribute values, values. GRsetattr provides a generic way for users to define metadata. It implements the label = value data abstraction. |
|
|
If an GR interface identifier (gr_id) is specified as the parameter obj_id, a global attribute is created which applies to all objects in the file. If a raster image identifier (ri_id) is specified as the parameter obj_id, an attribute is attached to the specified raster image. |
|
|
The parameter attr_name can be any ASCII string. |
|
|
The parameter data_type can contain any data type supported by the HDF library. These data types are listed in Table 1A in Section I of this manual. |
|
|
Attribute values are passed in the parameter values. The number of attribute values is defined by the parameter count . If more than one value is stored, all values must have the same data type. If an attribute with the given name, data type and number of values exists, it will be overwritten. Currently, the only predefined attribute is the fill value, identified by the FILL_ATTR definition. |
|
|
Note that there are two FORTRAN-77 versions of this routine; one for numeric data (mgsnatt) and the other for character data (mgscatt). |