Page tree

The license could not be verified: License Certificate has expired!

An HDF5 Dimension Scale (DS) is an HDF5 dataset that is associated with a dimension of another HDF5 dataset. A common case is a 2-dimensional array that has spatial information, such as latitude and longitude, associated with it.

 For more information, see the HDF5 Dimension Scale API Reference.

 

 

Converting a dataset to a dimension scale

The API function H5DS_SET_SCALE converts an existing dataset to a dimension scale:

   H5DSset_scale (did, dimname);

This function accepts a parameter did, obtained from the HDF5 library function H5Dopen, that identifies the dataset, and dimname, an optional name for the dimension scale. Internally, the function creates a set of attributes that identify the dataset as a dimension scale for the dimension scale API.

 

 

Attaching a dimension scale to a dataset

To attach a dimension scale to an HDF5 dataset, the H5DS_ATTACH_SCALE function is used:

   
   H5DSattach_scale (did, ds_id, index);

This function accepts a parameter did, obtained from the HDF5 library function H5Dopen, that identifies the dataset that the dimension scale is to be associated with, ds_id, the identifier of the dimension scale dataset, and index, the dimension of the dataset the dimension scale is to be associated with.

 

 

Detaching a dimension scale from a dataset

To detach a dimension scale from an HDF5 dataset, the H5DS_DETACH_SCALE function is used:

   H5DSdetach_scale (did, ds_id, index);

This function accepts a parameter did, obtained from the HDF5 library function H5Dopen, that identifies the dataset that the dimension scale is to be detached from, ds_id, the identifier of the dimension scale dataset, and index, the dimension of the dataset the dimension scale is to be detached from.


--- Last Modified: December 12, 2017 | 07:51 AM