-
A class that stores the data from an xmrg data grid.
[
verification_docs |
Source |
Implementation |
Keywords |
Summary | Ancestors | All Members | Descendants ]
- DESCRIPTION
- AUTHOR
Class Summary
class Grid
{
public:
- Grid(char * s, const GridType >, const DataType &dt, const int &col, const int &row, char * c);
- Grid(const int & i , const int & j , const Date & dt , const GridType & g , const DataType & d );
- Grid(const Grid& g);
- ~Grid();
- Grid& operator=(const Grid& rhs);
- Grid& operator+=(const Grid& rhs);
- void showMe();
- bool getData(const int & lowI, const int & hiI, const int & lowJ, const int & hiJ, vector<float> & v) const;
- int getNumI() const ;
- int getNumJ() const ;
- int getHrapI() const ;
- int getHrapJ() const ;
- DataType getDataType() const ;
- GridType getGridType() const ;
- Date getGridDate() const ;
- float getPoint(const int & i, const int & j) const ;
- float getValidPoint(const int & i, const int & j) const;
- void setPoint(const int& i, const int& j, const float& value) ;
- static float _getValidThreshold();
- static vector< vector<bool> > _getBitMask();
- static vector< vector<bool> > _wfoBitMask;
- static float _validThreshold;
- int getNumValidPoints() ;
protected:
private:
- Date _dateTime;
- GridType _gridType;
- DataType _dataType;
- int _eNumI;
- int _eNumJ;
- int _bufI;
- int _bufJ;
- int _validPoints;
- vector< vector<float> > _data;
- int _hrapI;
- int _hrapJ;
- void _hrapToLatLong(double col, double row, double& x, double& y);
- void _gzXmrgToAscii(char * fileName);
}; // Grid
DESCRIPTION
A class that stores the data from an xmrg data grid.
AUTHOR
Mike Smoot
Grid(char * s, const GridType >, const DataType &dt, const int &col, const int &row, char * c);
Constructor - Constructs instance from a gzipped xmrg file.
Grid(char * s, const GridType >, const DataType &dt, const int &col,
const int &row, char * c);
Grid(const int & i , const int & j , const Date & dt , const GridType & g , const DataType & d );
Constructor - Default constructor. Constructs place holder.
Grid(const int & i = 195,
const int & j = 235,
const Date & dt = Date::defaultDate,
const GridType & g = NO_GRID_TYPE,
const DataType & d = NO_DATA_TYPE );
Grid(const Grid& g);
Copy constructor.
Grid(const Grid& g);
~Grid();
Destructor.
~Grid();
Grid& operator=(const Grid& rhs);
Operator =
Grid& operator=(const Grid& rhs);
Grid& operator+=(const Grid& rhs);
Operator += - Adds data point by data point.
Grid& operator+=(const Grid& rhs);
void showMe();
Dumps all grid data. Used for debugging purposes.
void showMe();
bool getData(const int & lowI, const int & hiI, const int & lowJ, const int & hiJ, vector<float> & v) const;
Sets a vector with the data from an area (not Area) specified
by index points.
bool getData(const int & lowI,
const int & hiI,
const int & lowJ,
const int & hiJ,
vector<float> & v) const;
int getNumI() const ;
Returns _eNumI
int getNumI() const ;
Function is currently defined inline.
int getNumJ() const ;
Returns _eNumJ
int getNumJ() const ;
Function is currently defined inline.
int getHrapI() const ;
Returns _hrapI
int getHrapI() const ;
Function is currently defined inline.
int getHrapJ() const ;
Returns _hrapJ
int getHrapJ() const ;
Function is currently defined inline.
DataType getDataType() const ;
Returns _dataType
DataType getDataType() const ;
Function is currently defined inline.
GridType getGridType() const ;
Returns _gridType
GridType getGridType() const ;
Function is currently defined inline.
Date getGridDate() const ;
Returns grid Date.
Date getGridDate() const ;
Function is currently defined inline.
float getPoint(const int & i, const int & j) const ;
Gets an individual point from the grid. This should not be used
for any calculations!!! Use getValidPoint instead.
float getPoint(const int & i, const int & j) const
;
Function is currently defined inline.
float getValidPoint(const int & i, const int & j) const;
Gets an individual point from the grid. The point returned
will be a value that falls within an WFO, or the value -999 if
the point is not within the WFO.
float getValidPoint(const int & i, const int & j) const;
void setPoint(const int& i, const int& j, const float& value) ;
Sets an individual point in the grid.
void setPoint(const int& i, const int& j, const float& value)
;
Function is currently defined inline.
float _getValidThreshold();
Gets and the pqpf_valid_threshold value.
static float _getValidThreshold();
vector< vector<bool> > _getBitMask();
This method creates a vector of a vector of bools where
each true point indicates that the point is within the
WFO boundary and thus valid.
static vector< vector<bool> > _getBitMask();
vector< vector<bool> > _wfoBitMask;
Bit mask grid that indicates whether points are within the WFO
static vector< vector<bool> > _wfoBitMask;
float _validThreshold;
A valud between 0 and 1 indicating what percentage of points
within a sub-basin must be valid.
static float _validThreshold;
int getNumValidPoints() ;
Returns the number of valid points in Grid.
int getNumValidPoints() ;
Function is currently defined inline.
Date _dateTime;
Grid Date
Date _dateTime;
GridType _gridType;
Grid Type
GridType _gridType;
DataType _dataType;
Grid DataType
DataType _dataType;
int _eNumI;
Expected number of columns (as found in the database).
int _eNumI;
int _eNumJ;
Expected number of rows (as found in the database).
int _eNumJ;
int _bufI;
Number of columns found in xmrg blob.
int _bufI;
int _bufJ;
Number of rows found in xmrg blob.
int _bufJ;
int _validPoints;
Number of valid points in grid.
int _validPoints;
vector< vector<float> > _data;
Matrix of data points.
vector< vector<float> > _data;
int _hrapI;
Hrap for columns.
int _hrapI;
int _hrapJ;
Hrap for rows.
int _hrapJ;
void _hrapToLatLong(double col, double row, double& x, double& y);
Method that calculates the latitude and longitude based on the
Hrap points.
This method currently isn't in use.
void _hrapToLatLong(double col,
double row,
double& x,
double& y);
void _gzXmrgToAscii(char * fileName);
Method that extracts the matrix of data points by reading a
gzipped xmrg file.
void _gzXmrgToAscii(char * fileName);
All Members
- public:
- Grid& operator=(const Grid& rhs);
- Grid& operator+=(const Grid& rhs);
- void showMe();
- bool getData(const int & lowI, const int & hiI, const int & lowJ, const int & hiJ, vector<float> & v) const;
- int getNumI() const ;
- int getNumJ() const ;
- int getHrapI() const ;
- int getHrapJ() const ;
- DataType getDataType() const ;
- GridType getGridType() const ;
- Date getGridDate() const ;
- float getPoint(const int & i, const int & j) const ;
- float getValidPoint(const int & i, const int & j) const;
- void setPoint(const int& i, const int& j, const float& value) ;
- static float _getValidThreshold();
- static vector< vector<bool> > _getBitMask();
- static vector< vector<bool> > _wfoBitMask;
- static float _validThreshold;
- int getNumValidPoints() ;
- protected:
Ancestors
Class does not inherit from any other class.
Descendants
Class is not inherited by any others.
Generated from source by the Cocoon utilities on Wed Aug 30 12:53:34 2000
.
Report problems to jkotula@stratasys.com