Relevant HDF links at NCSA: 
HDF Home Page 
HDF4/HDF5 Conversion Tools 
H4toH5 Conversion Library documents:  
Reference Manual  (printable PDF)  
User's Guide  (printable PDF)  
Programmer's Notes  
Mapping HDF4 Objects to HDF5 Objects  

H4toH5 Conversion Library

API Reference Manual

The H4toH5 Conversion Library, generally referred to as the H4toH5 library, provides functions for the conversion of HDF4 data structures and objects to corresponding HDF5 data structures and objects.
General functions
  • H4toH5open
  • H4toH5open_id
  • H4toH5close
  • Global attributes
  • H4toH5glo_sds_attr
  • H4toH5glo_image_attr
  • Datatypes
  • H4toH5datatype
  • Dimension scales
  • H4toH5one_dimscale
  • H4toH5all_dimscale
  • Annotations
  • H4toH5anno_file_label
  • H4toH5anno_file_desc
  • H4toH5anno_file_all_labels
  • H4toH5anno_file_all_descs
  • H4toH5anno_obj_label
  • H4toH5anno_obj_desc
  • H4toH5anno_obj_all_labels
  • H4toH5anno_obj_all_descs
  • Error messages
  • H4toH5error_get
  •     
    Vgroups
  • H4toH5bas_vgroup
  • H4toH5vgroup_attr_name
  • H4toH5vgroup_attr_index
  • H4toH5adv_group
  • Vdatas
  • H4toH5vdata
  • H4toH5vdata_attr_name
  • H4toH5vdata_attr_index
  • H4toH5vdata_field_attr_name
  • H4toH5vdata_field_attr_index
  • SDSs
  • H4toH5sds
  • H4toH5sds_attr_name
  • H4toH5sds_attr_index
  • Images and palettes
  • H4toH5image
  • H4toH5image_attr_name
  • H4toH5image_attr_index
  • H4toH5pal
  • Lone objects
  • H4toH5all_lone_sds
  • H4toH5all_lone_image
  • H4toH5all_lone_vdata

  • Alphabetical Listing
  • H4toH5adv_group
  • H4toH5all_dimscale
  • H4toH5all_lone_image
  • H4toH5all_lone_sds
  • H4toH5all_lone_vdata
  • H4toH5anno_file_all_descs
  • H4toH5anno_file_all_labels
  • H4toH5anno_file_desc
  • H4toH5anno_file_label
  • H4toH5anno_obj_all_descs
  • H4toH5anno_obj_all_labels
  • H4toH5anno_obj_desc
  •  
  • H4toH5anno_obj_label
  • H4toH5bas_vgroup
  • H4toH5close
  • H4toH5datatype
  • H4toH5error_get
  • H4toH5glo_image_attr
  • H4toH5glo_sds_attr
  • H4toH5image
  • H4toH5image_attr_index
  • H4toH5image_attr_name
  • H4toH5one_dimscale
  • H4toH5open
  •  
  • H4toH5open_id
  • H4toH5pal
  • H4toH5sds
  • H4toH5sds_attr_index
  • H4toH5sds_attr_name
  • H4toH5vdata
  • H4toH5vdata_attr_index
  • H4toH5vdata_attr_name
  • H4toH5vdata_field_attr_index
  • H4toH5vdata_field_attr_name
  • H4toH5vgroup_attr_index
  • H4toH5vgroup_attr_name

  • General functions


    Name: H4toH5open
    Signature:
    hid_t H4toH5open (char * H4file_name, char * H5file_name, int access)
    Purpose:
    Initializes the H4toH5 library interface.
    Description:
    H4toH5open initializes the H4toH5 library to convert data from one HDF4 file to one HDF5 file. Either this function or H4toH5open_id must be the first H4toH5 library function called in an application.

    If H5file_name is set to NULL, the HDF5 filename will be similar to the HDF4 filename, but with the extension .h5.

    The access flag specifies whether an existing HDF5 file is to be overwritten.

    The h4toh5 identifier returned by this function must be released with H4toH5close or resource leaks will develop.

    Parameters:
    Returns:
    Returns an h4toh5 identifier if successful; otherwise returns a negative value.
    Non-C API(s):

    Name: H4toH5open_id
    Signature:
    hid_t H4toH5open_id (char * H4file_name, hid_t file5_id)
    Purpose:
    Initializes the H4toH5 library interface.
    Description:
    H4toH5open_id initializes the H4toH5 library to convert data from one HDF4 file to one HDF5 file. Either this function or H4toH5open must be the first H4toH5 library function called in an application.

    In contrast to H4toH5open, a user must first create or open an HDF5 file and optionally specify an HDF5 file property list for that file before passing an HDF5 file identifier to this function.

    The h4toh5 identifier returned by this function must be released with H4toH5close or resource leaks will develop.

    Parameters:
    Returns:
    Returns an h4toh5 identifier if successful; otherwise returns a negative value.
    Non-C API(s):

    Name: H4toH5close
    Signature:
    int H4toH5close (hid_t h5toh5id)
    Purpose:
    Terminates access to the H4toH5 library.
    Description:
    H4toH5close closes all HDF4 and HDF5 object interfaces internally opened by the H4toH5 library and terminates access to the H4toH5 library.

    A user application should close all HDF4 and HDF5 object interfaces opened by that application.

    Parameters:
    Returns:
    Returns a non-negative value if successful; otherwise returns a negative value.
    Non-C API(s):

    Global attributes


    Name: H4toH5glo_sds_attr
    Signature:
    int H4toH5glo_sds_attr(hid_t h4toh5id)
    Purpose:
    Converts all HDF4 SD interface attributes to attributes of the HDF5 root group.
    Description:
    H4toH5glo_sds_attr converts all global SD interface attributes to attributes of the HDF5 root group. The HDF5 attribute names will consist of the prefix GLOSDS_ appended to the HDF4 attribute names.
    Parameters:
    Returns:
    Returns a non-negative value if successful; otherwise returns a negative value.
    Non-C API(s):
     

    Name: H4toH5glo_image_attr
    Signature:
    int H4toH5glo_image_attr(hid_t h4toh5id)
    Purpose:
    Converts all HDF4 GR interface attributes to attributes of the HDF5 root group.
    Description:
    H4toH5glo_image_attr converts all GR interface attributes to attributes of the HDF5 root group. The HDF5 attribute names consist of the prefix GLOIMAGE_ appended to the HDF4 attribute names.
    Parameters:
    Returns:
    Returns a non-negative value if successful; otherwise returns a negative value.
    Non-C API(s):

    Datatypes


    Name: H4toH5datatype
    Signature:
    int H4toH5datatype(hid_t h4toh5id, const int32 h4type, hid_t * h5type_ptr, hid_t * h5mem_type_ptr, size_t * h4size_ptr, size_t * h4mem_size_ptr)
    Purpose:
    Retrieves HDF5 atomic file and memory datatypes and data sizes converted from HDF4 objects.
    Description:
    H4toH5datatype enables the user to retrieve datatype conversion information.

    File and memory datatypes, and the size of file and memory datatypes may be represented differently from machine to machine and from memory to disk. H4toH5_datatypeconv may help users to understand the principals and mechanics of datatype and data size conversion, particularly when doing the conversions on different platforms.

    Parameters:
    Returns:
    Returns a non-negative value if successful; otherwise returns a negative value.
    Non-C API(s):

    Dimension scales


    Name: H4toH5one_dimscale
    Signature:
    int H4toH5one_dimscale(hid_t h4toh5id, int32 sds_id, char * h5group_full_path, char * h5dset_name, char * h5dim_group_full_path, char * h5dim_name, int attr_flag, int ref_flag, int dim_index)
    Purpose:
    Converts an HDF4 dimension scale dataset to an HDF5 dataset.
    Description:
    H4toH5one_dimscale converts one dimension scale dataset of one SDS object to an HDF5 dataset.

    This function also provides a mechanism for associating the dimension scale dataset with a converted SDS or other equivalent HDF5 datasets. The association is made through an HDF5 dataset attribute that stores an object reference from the HDF5 dataset to dimension scale dataset. (See Mapping HDF4 Objects to HDF5 Objects [1], section 3.1 and figure 1, for details.)

    The ref_flag parameter controls whether the HDF5 dataset converted from the dimension scale is associated with the HDF5 dataset converted from the SDS or with other HDF5 datasets. The user can choose to convert only the dimension scale dataset by setting the ref_flag parameter to H425_NOREF. If the user wants the converted dimension scale to be associated with another HDF5 dataset, the HDF5 dataset name must be provided in h5dset_name.

    The attr_flag parameter specifies whether attributes of the dimension scale are to be converted.

    Note: HDF5 dimension scale specification is currently under development. This API is subject to change to maintain consistency once the HDF5 dimension scale specification is finalized.

    Parameters:
    Returns:
    Returns a non-negative value if successful; otherwise returns a negative value.
    Non-C API(s):

    Name: H4toH5all_dimscale
    Signature:
    int H4toH5all_dimscale(hid_t h4toh5id, int32 sds_id, char * h5group_full_path, char * h5dset_name, char * h5dim_group_full_path, int attr_flag, int ref_flag)
    Purpose:
    Converts all HDF4 dimension scale datasets to HDF5 datasets.
    Description:
    H4toH5all_dimscale converts all dimension scale datasets associated with one SDS object to HDF5 datasets.

    This function also provides a mechanism to associate the dimension scale datasets with the converted SDS object or another equivalent HDF5 dataset. The association is made through an attribute of the HDF5 dataset that stores an object reference from the HDF5 dataset to the dimension scale dataset. (See Mapping HDF4 Objects to HDF5 Objects [1], section 3.1 and figure 1, for details.)

    The ref_flag parameter specifies whether the HDF5 datasets containing the converted dimension scales are to be associated with another HDF5 dataset. If the dimension scales are to be converted only (i.e., and not associated with another HDF5 dataset), ref_flag is set to H425_NOREF. If the converted dimension scales are to associated with another HDF5 dataset, ref_flag is set to H425_REF and the dataset is specified in h5dset_name.

    The attr_flag parameter specifies whether attributes of the dimension scale are to be converted.

    Note: HDF5 dimension scale specification is currently under development. This API is subject to change to maintain consistency once the HDF5 dimension scale specification is finalized.

    Parameters:
    Returns:
    Returns a non-negative value if successful; otherwise returns a negative value.
    Non-C API(s):

    Annotations


    Name: H4toH5anno_file_label
    Signature:
    int H4toH5anno_file_label(hid_t h4toh5id, char * anno_label_name, int label_index)
    Purpose:
    Converts an HDF4 file label to an HDF5 root group attribute
    Description:
    H4toH5anno_file_label converts an HDF4 file label annotation to an attribute of the root group of the target HDF5 file.

    If anno_label_name is set to NULL, a default attribute name is created as the string HDF4_FILE_LABEL_index, where index is the index of the file label.

    If label_index is beyond the range of valid HDF4 file label annotations, a warning message will be generated and nothing will be converted.

    Parameters:
    Returns:
    Returns a non-negative value if successful; otherwise returns a negative value.
    Non-C API(s):

    Name: H4toH5anno_file_desc
    Signature:
    int H4toH5anno_file_desc(hid_t h4toh5id, char * anno_desc_name, int desc_index)
    Purpose:
    Converts an HDF4 file description to an attribute of the HDF5 root group.
    Description:
    H4toH5annofil_desc converts an HDF4 file description annotation to an attribute of the root group of the target HDF5 file.

    If the anno_desc_name parameter is set to NULL, a default attribute name is created as the string HDF4_FILE_DESCRIPTION_index, where index is the HDF4 index of the file description annotation.

    If desc_index is beyond the range of valid HDF4 file description annotations, a warning message will be generated and nothing will be converted.

    Parameters:
    Returns:
    Returns a non-negative value if successful; otherwise returns a negative value.
    Non-C API(s):

    Name: H4toH5anno_file_all_labels
    Signature:
    int H4toH5anno_file_all_labels(hid_t h4toh5id)
    Purpose:
    Converts all HDF4 file labels to HDF5 root group attributes.
    Description:
    H4toH5anno_file_all_labels converts all HDF4 file label annotations to attributes of the root group of the target HDF5 file.

    The name of each attribute is created as the string HDF4_FILE_LABEL_index, where index is the HDF4 index of the file label annotation.

    Parameters:
    Returns:
    Returns a non-negative value if successful; otherwise returns a negative value.
    Non-C API(s):

    Name: H4toH5anno_file_all_descs
    Signature:
    int H4toH5anno_file_all_descs(hid_t h4toh5id)
    Purpose:
    Converts all HDF4 file descriptions to HDF5 root group attributes.
    Description:
    H4toH5anno_file_all_descs converts all HDF4 file description annotations to attributes of the root group of the target HDF5 file.

    The name of each attribute is created as the string HDF4_FILE_DESCRIPTION_index, where index is the index of the file description annotation.

    Parameters:
    Returns:
    Returns a non-negative value if successful; otherwise returns a negative value.
    Non-C API(s):

    Name: H4toH5anno_obj_label
    Signature:
    int H4toH5anno_obj_label(hid_t h4toh5id, char * h5group_full_path, char * h5dset_name, uint16 obj_ref, int32 obj_tag, char * anno_label_name, int label_index)
    Purpose:
    Converts an HDF4 object label to an HDF5 object attribute.
    Description:
    H4toH5anno_obj_label converts an HDF4 object label annotation to an attribute of the corresponding HDF5 dataset or group.

    H4toH5anno_obj_label passes the absolute pathname of an HDF5 group in h5group_full_path. If the object label to be converted is a group annotation, h5dset_name is set to NULL and the converted label will be associated with the group indicated by h5group_full_path. If the object label to be converted is a dataset annotation, the converted label will be associated with the dataset specified in h5dset_name.

    If anno_label_name is set to NULL, a default attribute name is created as the string HDF4_OBJECT_LABEL_index, where index is the index of the object label.

    Only object label annotations associated with the following basic HDF4 objects can be converted: Vgroups, Vdatas, SDSs, images, and palettes.

    If label_index is beyond the range of valid HDF4 object label annotations, a warning message will be generated and nothing will be converted.

    Parameters:
    Returns:
    Returns a non-negative value if successful; otherwise returns a negative value.
    Non-C API(s):

    Name: H4toH5anno_obj_desc
    Signature:
    int H4toH5anno_obj_desc(hid_t h4toh5id, char * h5group_full_path, char * h5dset_name, uint16 bj_ref, int32 obj_tag, char * anno_desc_name, int desc_index)
    Purpose:
    Converts an HDF4 object description to HDF5 object attribute.
    Description:
    H4toH5anno_obj_desc converts an HDF4 object description annotation to an attribute of the corresponding HDF5 dataset or group.

    This function passes the absolute pathname of an HDF5 group in h5group_full_path. If the object description to be converted is a group annotation, h5dset_name is set to NULL and the converted description will be associated with the group indicated by h5group_full_path. If the object description to be converted is a dataset annotation, the converted description will be associated with the dataset specified in h5dset_name.

    If the anno_desc_name parameter is not provided, a default attribute name is created as the string HDF4_OBJECT_DESCRIPTION_index, where index is the index of the object description.

    Only object description annotations associated with the following basic HDF4 objects can be converted: Vgroups, Vdatas, SDSs, images, and palettes.

    If desc_index is beyond the range of valid HDF4 object description annotations, a warning message will be generated and nothing will be converted.

    Parameters:
    Returns:
    Returns a non-negative value if successful; otherwise returns a negative value.
    Non-C API(s):

    Name: H4toH5anno_obj_all_labels
    Signature:
    int H4toH5anno_obj_all_labels(hid_t h4toh5id, char * h5group_full_path, char * h5dset_name, uint16 obj_ref, int32 obj_tag)
    Purpose:
    Converts all label annotations of an HDF4 object to HDF5 attributes.
    Description:
    H4toH5anno_obj_all_labels converts all object label annotations associated with an HDF4 object to attributes of the corresponding HDF5 dataset or group.

    H4toH5anno_obj_all_labels passes the absolute pathname of an HDF5 group in h5group_full_path. If the object labels to be converted are group annotations, h5dset_name is set to NULL and the converted labels will be associated with the group indicated by h5group_full_path. If the object labels to be converted are dataset annotations, the converted labels will be associated with the dataset specified in h5dset_name.

    Attribute names are created as the string HDF4_OBJECT_LABEL_index, where index is the index of the object label.

    Only object label annotations associated with the following basic HDF4 objects can be converted: Vgroups, Vdatas, SDSs, images, and palettes.

    Parameters:
    Returns:
    Returns a non-negative value if successful; otherwise returns a negative value.
    Non-C API(s):

    Name: H4toH5anno_obj_all_descs
    Signature:
    int H4toH5anno_obj_all_descs(hid_t h4toh5id, char * h5group_full_path, char * h5dset_name, uint16 obj_ref, int32 obj_tag)
    Purpose:
    Converts all description annotations of an HDF4 object to HDF5 attributes.
    Description:
    H4toH5anno_obj_all_descs converts all description annotations associated with an HDF4 object to attributes of the corresponding HDF5 dataset or group.

    H4toH5anno_obj_all_descs passes the absolute pathname of an HDF5 group in h5group_full_path. If the object descriptions to be converted are group annotations, h5dset_name is set to NULL and the converted labels will be associated with the group indicated by h5group_full_path. If the object descriptions to be converted are dataset annotations, the converted labels will be associated with the dataset specified in h5dset_name.

    Default attribute names are created as the string HDF4_OBJECT_DESCRIPITION_index, where index is the object description index.

    Only object description annotations associated with the following basic HDF4 objects can be converted: Vgroups, Vdatas, SDSs, images, and palettes.

    Parameters:
    Returns:
    Returns a non-negative value if successful; otherwise returns a negative value.
    Non-C API(s):

    Error messages


    Name: H4toH5error_get
    Signature:
    int H4toH5error_get(hid_t h4toh5id)
    Purpose:
    Prints error information.
    Description:
    H4toH5error_get prints error information to standard output.

    The error information includes the following:

    This function is provided primarily for debugging purposes.

    Parameters:
    Returns:
    Should always return 0 (zero).
    Non-C API(s):

    Vgroups


    Name: H4toH5bas_vgroup
    Signature:
    int H4toH5bas_vgroup (hid_t h4toh5id, int32 vgroup_id, char * h5parent_group_full_path, char * h5child_group_name, int vg_flag, int attr_flag)
    Purpose:
    Converts an HDF4 Vgroup to an HDF5 group.
    Description:
    H4toH5bas_vgroup converts an HDF4 Vgroup to an HDF5 group.

    Depending on the setting of the vg_flag parameter, either the Vgroup only or the Vgroup and its non-Vgroup members will be converted to corresponding HDF5 objects.

    H4toH5bas_vgroup is designed for use with a single Vgroup. Use H4toH5adv_group to recursively convert a Vgroup and member Vgroups to HDF5 objects.

    Parameters:
    Returns:
    Returns a non-negative value if successful; otherwise returns a negative value.
    Non-C API(s):

    Name: H4toH5vgroup_attr_name
    Signature:
    int H4toH5vgroup_attr_name (hid_t h4toh5id, int32 vgroup_id, char * h5parent_group_full_path, char * h5child_group_name, char * attr_name)
    Purpose:
    Converts an HDF4 Vgroup attribute to an HDF5 group attribute.
    Description:
    H4toH5vgroup_attr_name converts an HDF4 Vgroup attribute, specified by its HDF4 name, to an HDF5 group attribute.

    This function assumes the preexistence of an HDF5 group that the converted Vgroup attribute will belong to. If h5child_group_name is set to NULL, the HDF4 Vgroup specified in vgroup_id should be converted before this function is called.

    The attr_name parameter specifies which Vgroup attribute is to be converted.

    Parameters:
    Returns:
    Returns a non-negative value if successful; otherwise returns a negative value.
    Non-C API(s):

    Name: H4toH5vgroup_attr_index
    Signature:
    int H4toH5vgroup_attr_index (hid_t h4toh5id, int32 vgroup_id, char * h5parent_group_full_path, char * h5child_group_name, int attr_index)
    Purpose:
    Converts an HDF4 Vgroup attribute to an HDF5 group attribute.
    Description:
    H4toH5vgroup_attr_index converts an HDF4 Vgroup attribute, specified by its HDF4 index, to an HDF5 group attribute.

    This function assumes the preexistence of an HDF5 group that the converted Vgroup attribute will belong to. If h5child_group_name is set to NULL, The HDF4 Vgroup specified in vgroup_id should be converted before this function is called.

    The attr_index parameter specifies which Vgroup attribute to be converted.

    Parameters:
    Returns:
    Returns a non-negative value if successful; otherwise returns a negative value.
    Non-C API(s):

    Name: H4toH5adv_group
    Signature:
    int H4toH5adv_group (hid_t h4toh5id, int32 vgroup_id, char * h5parent_group_full_path, char * h5child_group_name)
    Purpose:
    Converts an HDF4 Vgroup and its descendents to an HDF5 group.
    Description:
    H4toH5adv_group converts an HDF4 Vgroup and all its descendents to an HDF5 group and its members.

    Users should be extremely careful when using this function, especially when the Vgroup structure to be converted is complicated.

    Parameters:
    Returns:
    Returns a non-negative value if successful; otherwise returns a negative value.
    Non-C API(s):

    Vdatas


    Name: H4toH5vdata
    Signature:
    int H4toH5vdata(hid_t h4toh5id, int32 vdata_id, char * h5group_full_path, char * h5dset_name, int attr_flag)
    Purpose:
    Converts an HDF4 Vdata object to an HDF5 dataset.
    Description:
    H4toH5vdata converts an independent Vdata object to an HDF5 dataset. The attr_flag parameter controls the conversion of Vdata attributes.
    Parameters:
    Returns:
    Returns a non-negative value if successful; otherwise returns a negative value.
    Non-C API(s):

    Name: H4toH5vdata_attr_name
    Signature:
    int H4toH5vdata_attr_name(hid_t h4toh5id, int32 vdata_id, char * h5group_full_path, char * h5dset_name, char* attr_name)
    Purpose:
    Converts an HDF4 Vdata object attribute to an HDF5 dataset attribute.
    Description:
    H4toH5vdata_attr_name converts an HDF4 Vdata attribute, specified by its HDF4 name, to an HDF5 dataset attribute.

    This function assumes the preexistence of an HDF5 dataset that the converted Vdata attribute will belong to. If h5dset_name is set to NULL, the HDF4 Vdata specified in vdata_id should be converted before this function is called.

    The attr_name parameter specifies which SDS attribute is to be converted.

    Parameters:
    Returns:
    Returns a non-negative value if successful; otherwise returns a negative value.
    Non-C API(s):

    Name: H4toH5vdata_attr_index
    Signature:
    int H4toH5vdata_attr_index(hid_t h4toh5id, int32 vdata_id, char * h5group_full_path, char * h5dset_name, int attr_index)
    Purpose:
    Converts an HDF4 Vdata object attribute to an HDF5 dataset attribute.
    Description:
    H4toH5vdata_attr_index converts an HDF4 Vdata attribute, specified by its HDF4 index, to an HDF5 dataset attribute.

    This function assumes the preexistence of an HDF5 dataset that the converted Vdata attribute will belong to. If h5dset_name is set to NULL, the HDF4 Vdata specified in vdata_id should be converted before this function is called.

    The attr_index parameter specifies which Vdata attribute is to be converted.

    Parameters:
    Returns:
    Returns a non-negative value if successful; otherwise returns a negative value.
    Non-C API(s):

    Name: H4toH5vdata_field_attr_name
    Signature:
    int H4toH5vdata_field_attr_name(hid_t h4toh5id, int32 vdata_id, char * h5group_full_path, char * h5dset_name, char * field_name, char * field_attr_name)
    Purpose:
    Converts an HDF4 Vdata field attribute to an HDF5 dataset attribute.
    Description:
    H4toH5vdata_field_attr_name converts an object attribute associated with an HDF4 Vdata field to an HDF5 dataset attribute. The Vdata field and the associated attribute are specified by their HDF4 names.

    This function assumes the preexistence of an HDF5 dataset that the converted Vdata field attribute will belong to. If h5dset_name is set to NULL, the HDF4 Vdata specified in vdata_id should be converted before this function is called.

    The parameters field_name and field_attrname, respectively, specify the Vdata field name and the associated object attribute name.

    Parameters:
    Returns:
    Returns a non-negative value if successful; otherwise returns a negative value.
    Non-C API(s):

    Name: H4toH5vdata_field_attr_index
    Signature:
    int H4toH5vdata_field_attr_index(hid_t h4toh5id, int32 vdata_id, char * h5group_full_path, char * h5dset_name, int field_index, int field_attr_index)
    Purpose:
    Converts an HDF4 Vdata field object attribute into an HDF5 dataset attribute.
    Description:
    H4toH5vdata_field_attr_index converts an object attribute associated with an HDF4 Vdata field to an HDF5 dataset attribute. The Vdata field and the associated attribute are specified by their HDF4 indexes.

    This function assumes the preexistence of an HDF5 dataset that the converted Vdata field attribute will belong to. If h5dset_name is set to NULL, the HDF4 Vdata specified in vdata_id should be converted before this function is called.

    The parameters field_index and field_attr_index, respectively, specify the Vdata field index and the associated object attribute index.

    Parameters:
    Returns:
    Returns a non-negative value if successful; otherwise returns a negative value.
    Non-C API(s):

    SDSs


    Name: H4toH5sds
    Signature:
    int H4toH5sds(hid_t h4toh5id, int32 sds_id, char * h5group_full_path, char * h5dset_name, char * h5dim_group_full_path, int dim_flag, int attr_flag)
    Purpose:
    Converts an HDF4 SDS object into an HDF5 dataset.
    Description:
    H4toH5sds converts an SDS object in the HDF4 file to an HDF5 dataset in the HDF5 file.

    Depending on the settings of the dim_flag and attr_flag parameters, the dimension scale datasets and attributes of the SDS object may or may not be converted.

    If dimension scale datasets are converted, the attr_flag parameter controls the conversion of their attributes.

    Parameters:
    Returns:
    Returns a non-negative value if successful; otherwise returns a negative value.
    Non-C API(s):

    Name: H4toH5sds_attr_name
    Signature:
    int H4toH5sds_attr_name( hid_t h4toh5id, int32 sds_id, char * h5group_full_path, char * h5dset_name, char * attr_name)
    Purpose:
    Converts an HDF4 SDS object attribute to an HDF5 dataset attribute.
    Description:
    H4toH5sds_attr_name converts an HDF4 SDS attribute, specified by its HDF4 name, to an HDF5 dataset attribute.

    This function assumes the preexistence of an HDF5 dataset that the converted SDS attribute will belong to. If h5dset_name is set to NULL, the HDF4 SDS specified in sds_id should be converted before this function is called.

    The attr_name parameter specifies which SDS attribute is to be converted.

    Parameters:
    Returns:
    Returns a non-negative value if successful; otherwise returns a negative value.
    Non-C API(s):

    Name: H4toH5sds_attr_index
    Signature:
    int H4toH5sds_attr_index(hid_t h4toh5id, int32 sds_id, char * h5group_full_path, char * h5dset_name, int attr_index)
    Purpose:
    Converts an HDF4 SDS object attribute to an HDF5 dataset attribute.
    Description:
    H4toH5sds_attr_index converts an HDF4 SDS attribute, specified by its HDF4 index, to an HDF5 dataset attribute.

    This function assumes the preexistence of an HDF5 dataset that the converted SDS attribute will belong to. If h5dset_name is set to NULL, the HDF4 SDS specified in sds_id should be converted before this function is called.

    The attr_index parameter specifies which SDS attribute is to be converted.

    Parameters:
    Returns:
    Returns a non-negative value if successful; otherwise returns a negative value.
    Non-C API(s):

    Images and palettes


    Name: H4toH5image
    Signature:
    int H4toH5image(hid_t h4toh5id, int32 ri_id, char * h5group_full_path, char * h5dset_name, char * h5pal_group_full_path, char * h5pal_name, int attr_flag, int pal_flag)
    Purpose:
    Converts an HDF4 image object to an HDF5 dataset.
    Description:
    H4toH5image converts an HDF4 image object to an HDF5 dataset. Depending on the settings of the attr_flag and pal_flag parameters, the associated palette and attributes may be converted. If the palette is converted, the attr_flag parameter also controls the conversion of the associated palette attributes.
    Parameters:
    Returns:
    Returns a non-negative value if successful; otherwise returns a negative value.
    Non-C API(s):

    Name: H4toH5image_attr_name
    Signature:
    int H4toH5image_attr_name(hid_t h4toh5id, int32 ri_id, char * h5group_full_path, char * h5dset_name, char * attr_name)
    Purpose:
    Converts an HDF4 image object attribute to an HDF5 dataset attribute.
    Description:
    H4toH5image_attr_name converts an HDF4 image attribute, specified by its HDF4 name, to an HDF5 dataset attribute.

    This function assumes the preexistence of an HDF5 dataset that the converted image attribute will belong to. If h5dset_name is set to NULL, the HDF4 image specified in ri_id should be converted before this function is called.

    The attr_name parameter specifies which image attribute is to be converted.

    This function works for the following types of HDF4 images: GR, RI8, and RI24.

    Parameters:
    Returns:
    Returns a non-negative value if successful; otherwise returns a negative value.
    Non-C API(s):

    Name: H4toH5image_attr_index
    Signature:
    int H4toH5image_attr_index(hid_t h4toh5id, int32 image_id, char * h5group_full_path, char * h5dset_name, int attr_index)
    Purpose:
    Converts an HDF4 image object attribute to an HDF5 dataset attribute.
    Description:
    H4toH5image_attr_index converts an HDF4 image attribute, specified by its HDF4 index, to an HDF5 dataset attribute.

    This function assumes the preexistence of an HDF5 dataset that the converted image attribute will belong to. If h5dset_name is set to NULL, the HDF4 image specified in ri_id should be converted before this function is called.

    The attr_index parameter specifies which image attribute is to be converted.

    This function works for the following types of HDF4 images: GR, RI8, and RI24.

    Parameters:
    Returns:
    Returns a non-negative value if successful; otherwise returns a negative value.
    Non-C API(s):

    Name: H4toH5pal
    Signature:
    int H4toH5pal(hid_t h4toh5id, int32 ri_id, char * h5group_full_path, char * h5dset_name, char * h5pal_group_full_path, char * h5pal_name, int attr_flag, int ref_flag)
    Purpose:
    Converts an HDF4 palette object to an HDF5 dataset and optionally attaches it to an HDF5 image dataset.
    Description:
    H4toH5pal converts an HDF4 palette object to an HDF5 palette dataset.

    The parameter ref_flag specifies whether to attach the palette to an HDF5 dataset. This HDF5 dataset should either be a converted HDF4 image object or conform to the HDF5 image specification (See section 3.4 and Figure 2 in Mapping HDF4 Objects to HDF5 Objects [1] for details.)

    The attr_flag parameter specifies whether the palette attributes are to be converted.

    Parameters:
    Returns:
    Returns a non-negative value if successful; otherwise returns a negative value.
    Non-C API(s):

    Lone objects


    Name: H4toH5all_lone_sds
    Signature:
    int H4toH5all_lone_sds(hid_t h4toh5id, char * h5group_full_path, char * h5dim_group_full_path, int dim_flag, int attr_flag)
    Purpose:
    Converts all independent HDF4 SDS objects to HDF5 datasets.
    Description:
    H4toH5all_lone_sds identifies all SDS objects in the HDF4 file that are not members of a user-defined Vgroup structure and converts them to HDF5 datasets. Such SDSs are sometimes referred to as lone or independent SDSs.
    Parameters:
    Returns:
    Returns a non-negative value if successful; otherwise returns a negative value.
    Non-C API(s):

    Name: H4toH5all_lone_image
    Signature:
    int H4toH5all_lone_image(hid_t h4toh5id, char * h5group_full_path, char * h5pal_group_full_path, int pal_flag, int attr_flag)
    Purpose:
    Converts all independent HDF4 image objects attribute to HDF5 datasets.
    Description:
    H4toH5all_lone_image identifies all image objects in the HDF4 file that are not members of a user-defined Vgroup structure and converts them to HDF5 datasets. Such images are sometimes referred to as lone or independent images.
    Parameters:
    Returns:
    Returns a non-negative value if successful; otherwise returns a negative value.
    Non-C API(s):

    Name: H4toH5all_lone_vdata
    Signature:
    int H4toH5all_lone_vdata(hid_t h4toh5id, char * h5group_full_path, int attr_flag)
    Purpose:
    Converts all lone HDF4 Vdata objects into HDF5 datasets.
    Description:
    H4toH5all_lone_vdata identifies all Vdatas in the HDF4 file that are not members of a user-defined Vgroup structure and converts them to HDF5 datasets.
    Parameters:
    Returns:
    Returns a non-negative value if successful; otherwise returns a negative value.
    Non-C API(s):

    HDF Help Desk
    Describes H4toH5 Conversion Library Release 1.2, March 2005