How to Create a New Attribute

The following instructions explain how to create a new attribute. This dialog allows the creation of attributes that are numbers or strings, and 1D arrays of numbers.

To create an attribute, it is necessary to define the name, type, and number of values or length of string. Then the value(s) can be entered.

At each step, be sure to type , to make sure the value is accepted by the dialog.

1) Attribute name

The name of the attribute is a string. HDF accepts almost any characters in an attribute name. The name can be up to ?? characters long. 

2) Datatype

A list of predefined datatypes are given. These are the data types that can be created with this tool, you can only select a datatype from the list.

The size specifies the size of a single data point in bits. 

3) Array length

The length field is used to specify the length of array or string. For numeric data, you can create an attribute with a single value or a one-dimension array of length values.

For a string attribute, the length is the maximum length of the String.

As a practical matter, attributes must be relatively small, perhaps a few kilobytes. 

4) Attribute value

The value field is used to enter the initial value of the attribute. Be sure to type after entering the value(s).

Numeric data is interpreted according to the Datatype , using the number formats supported by Java. If the attribute is an array, values of the array must be separated by a comma, for example, 12, 3, 4, 5.

In the case of a string attribute, the entered text is stored as the string.

Note that the dialog will accept more values than will fit. In this case, the excess values will not be written to the file, although they may remain visible in the dialog.