GeoGroupReader

The class GeoGroupReader reads attributes and arrays from the geography group of a qdf file.

This file extends the attribute structure:

struct GeoAttributes : Attributes {
    uint    m_iMaxNeighbors;
    double  m_dRadius;
    double  m_dSeaLevel;
};
Code:

Public Methods

createGeoGroupReader

static GeoGroupReader *createGeoGroupReader(const std::string sFileName);
static GeoGroupReader *createGeoGroupReader(hid_t hFile);

Creates a GeoGroupReader object for a qdf file.

sFileName

Name of the file to read the geography data from.

hFile

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

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

tryReadAttributes

virtual int tryReadAttributes(GeoAttributes *pAttributes);

Reads the attributes “NumCells”, “MaxNeigh”, “Radius”, “SeaLevel” from the geography group into the attribute structure.

pAttributes

A pointer to a GeoAttributes object to hold the attributes.

Returns 0 on succes, or -1 on failure.

readArray

virtual int readArray(Geography *pGeography, const std::string sArrayName);

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

pGeography

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

sArrayName

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

Returns 0 on succes, or -1 on failure.

readData

virtual int readData(Geography *pGeography);

Reads the arrays “Longitude”, “Latitude”, “Altitude”, “Area”, “Distances”, “IceCover”, “Water” and “Coastal”.

pGeography

A Pointer to a Geography object.

Returns 0 on succes, or -1 on failure.

Protected Methods

constructor

GeoGroupReader();

The constructor.