Writing Annotations
Contents:
Typical functions that you would use to write an annotation are as follows:
- ANcreate (afcreate)
- Create a data label (AN_DATA_LABEL) or data
description (AN_DATA_DESC)
annotation for the object identified by the specified tag and reference
number.
- ANcreatef (affcreate)
- Create a file label (AN_FILE_LABEL) or file
description (AN_FILE_DESC)
annotation.
- ANwriteann (afwriteann)
- Write an annotation to the current file.
The an_write program is a sample program for writing out the
four types of annotations. You can either download the C or FORTRAN
program at the end, or just take a look at the HTML version, with the
HDF calls highlighted:
If you have downloaded this program, then you can
compile and run it. It creates an HDF file
called an.hdf. You can view the contents of the HDF file
that gets created by this program, in the next section,
"Contents of HDF File Created".
Following is a detailed review of what this program does:
You can view the contents of an.hdf, using the
hdp command. Following is the output
you would get by examining the file with hdp list -a -n an.hdf:
File: an.hdf
File library version: Major= 4, Minor=1, Release=1
String=NCSA HDF Version 4.1 Release 1, February 21, 1997
File Label #0: This is a file label.
File description #0: This is a file description.
no tagname tag ref index_by_tag
0 Version Descriptor 30 1 0
1 File Identifier 100 1 0
2 File Description 101 1 0
3 Data Id Label 104 1 0
4 Data Id Annotation 105 1 0
5 Vgroup 1965 2 0
Name/Label=This is a data label.
Description=This is a data description.
Programs used in this tutorial:
[Compiling a program]