VegGroupReader

The class VegGroupReader reads attributes and arrays from the vegetation group of a qdf file.

This file extends the attribute structure:

struct VegAttributes : Attributes {
    int     m_iNumVegSpc;
};
Code:

Public Methods

createVegGroupReader

static VegGroupReader *createVegGroupReader(const std::string sFileName);
static VegGroupReader *createVegGroupReader(hid_t hFile);

Creates a VegGroupReader object for a qdf file.

sFileName

Name of the file to read the vegetation data from.

hFile

HDF5 handle for the file to read the vegetation data from.

Returns a pointer to the VegGroupReader object or NULL on failure.

tryReadAttributes

virtual int tryReadAttributes(VegAttributes *pAttributes);

Reads the attribute “NumCells” and “NumSpecies” in the vegetation group into the attribute structure.

pAttributes

A pointer to a VegAttributes object to hold the attributes.

Returns 0 on success, -1 on failure.

readArray

virtual int readArray(Vegetation *pVegetation, const std::string sArrayName);

Read the specified array from the “Vegetation” group of the qdf file.

pVegetation

A pointer to the Vegetation object into which to read the array,

sArrayName

Name of the array in the “Vegetation” group of the qdf file.

Returns 0 on succes, or -1 on failure.

readData

virtual int readData(Vegetation *pVegetation);

Reads the arrays “BaseNPP” and “NPP”.

pVegetation

A Pointer to a Vegetation object.

Returns 0 on succes, or -1 on failure.

Protected Methods

constructor

VegGroupReader();

The constructor.