[Top] [Prev] [Next]

5.2 The Vgroup Data Model

A vgroup is a structure designed to associate related data objects. The general structure of a vgroup is similar to that of the UNIX file system in that the vgroup may contain references to other vgroups or HDF data objects just as the UNIX directory may contain subdirectories or files (see Figure 5a). In previous versions of HDF, the data objects in a vgroup were limited to vdatas and vgroups. The data objects that belong to a vgroup are often referred to as the vgroup's members.

FIGURE 5a - Similarity of the HDF Vgroup Structure and the UNIX File System

5.2.1 Vgroup Names and Classes

A vgroup has a required vgroup name and an optional vgroup class associated with it. The vgroup name and class are used in describing and classifying the data objects belonging to the vgroup.

A vgroup name is a character string and is used to semantically distinguish between vgroups in an HDF file. If the user does not assign a name to a vgroup, then the HDF library will assign a zero-length string as the name of the vgroup. Multiple vgroups in a file can have the same name; however, unique names make it easier to distinguish among vgroups and are recommended.

A vgroup class is a character string and can be used to classify data objects by their intended use. For example, a vdata object named "Storm Tracking Data - 5/11/94" and another vdata object named "Storm Tracking Data - 6/23/94" can be grouped together under a vgroup named "Storm Tracking Data - 1994". If the data was collected in Anchorage, Alaska the class name might be "Anchorage Data", particularly if other vgroups contain storm track data collected in different locations. A class name is not required for a vgroup, therefore the HDF library will not assign a class name to the vgroup if one is not defined by the user.

The specific use of the vgroup name and class name is solely determined by HDF users.

5.2.2 Vgroup Organization

There are many ways to organize vgroups through the use of the Vgroup interface. Vgroups may contain any number of vgroups and data objects, including data objects and vgroups that are members of other vgroups. Therefore, a data object may have more than one parent vgroup. For example, Data object A and Vgroup B, shown in Figure 5b, are members of multiple vgroups with different organizational structures.

FIGURE 5b - Sharing Data Objects among Vgroups

A vgroup can contain any combination of data objects. Figure 5c illustrates a vgroup that contains two raster images and a vdata.

FIGURE 5c - A Vgroup Containing Two 8-Bit Raster Images, or RIS8 Objects, and a Vdata

5.2.3 An Example Using Vgroups

Although vgroups can contain any combination of HDF data objects, it is often useful to establish conventions on the content and structure of vgroups. This section, with the illustration in Figure 5d, describes an example of a vgroup convention that is used by scientific and graphics programmers to describe the surfaces of a mathematical or material object as well as its properties.

This vgroup consists of one list of coordinate data, one list of connectivity data, and one list of node property data. These three lists are stored in separate vdata objects within the vgroup.

Each 2-dimensional coordinate in the list of coordinate data defines the relative location of a vertex, or node. Each entry in the list of connectivity data is an ordered list of node numbers which describes a polygon. This ordered list is referred to as the connectivity list. For example, the number "2" as an item in a connectivity list would represent the second entry in the node table. Node properties are user-defined values attached to each node within the polygon and can be numbers or characters.

For example, consider a heated mesh of 400 triangles formed by connecting 1000 nodes. A vgroup describing this mesh might contain the coordinates of the vertices, the temperature value of the vertices, and a connectivity list describing the edges of the triangles.

FIGURE 5d - Vgroup Structure Describing a Heated Mesh



[Top] [Prev] [Next]

hdfhelp@ncsa.uiuc.edu
HDF User's Guide - 05/19/99, NCSA HDF Development Group.