This class defines a grid. More...
#include "../include/Grid.h"
Public Member Functions | |
| Grid () | |
| Grid (int rnx, int rny) | |
| Grid (const Grid &grid) | |
| ~Grid () | |
| int | init () |
| int | copy (const Grid &grid) |
| int | copyInfo (const Grid &grid) |
| int | copyData (const Grid &grid) |
| Grid | operator= (const Grid &grid) |
| int | setType (int val) |
| int | getType () |
| int | setSource (int val) |
| int | getSource () |
| int | setVersion (int val) |
| int | getVersion () |
| int | setDatim (const char *str) |
| const char * | getDatim () |
| int | setInfo (const char *str) |
| const char * | getInfo () |
| int | setDate (Date &d) |
| int | setDate (DateVal &dv) |
| Date | getDate () |
| Date | getDate (Date &rdate) |
| DateVal | getDateVal () |
| int | setSize (int x, int y) |
| int | getSize (int &x, int &y) |
| int | getNx () |
| int | getNy () |
| float | getDx () |
| float | getDy () |
| int | setGridType (int type) |
| int | getGridType () |
| int | setDomain (DomainVal &dv) |
| int | setDomain (Domain &dom) |
| DomainVal | getDomainVal () |
| Domain | getDomain () |
| int | getDomain (Domain &dom) |
| int | getProj () |
| int | tran (EarthPoint ept, Point &pt) |
| int | tran (Point pt, EarthPoint &ept) |
| int | tran (GridPoint gpt, Point &pt) |
| int | tran (Point pt, GridPoint &gpt) |
| int | tran (EarthPoint ept, GridPoint &gpt) |
| int | tran (GridPoint gpt, EarthPoint &ept) |
| int | tran (Domain &dom, Point pt1, Point &pt2) |
| int | tran (Point pt1, Domain &dom, Point &pt2) |
| int | setModel (int val) |
| int | getModel () |
| int | setGenName (const char *str) |
| const char * | getGenName () |
| int | setVar (VarSpec v) |
| int | getVar (VarSpec &v) |
| VarSpec | getVarSpec () |
| int | setLevel (const char *str) |
| int | setLevel (Level &l) |
| int | getLevel (Level &l) |
| Level | getLevel () |
| int | getLevelType () |
| int | setForeTime (const char *str) |
| int | setForeTime (ForeTime &t) |
| int | getForeTime (ForeTime &t) |
| ForeTime | getForeTime () |
| float | getForeHour () |
| int | getForeSecs () |
| int | setVar (const char *str) |
| int | setVar (Variable &v) |
| const char * | getUnits () |
| int | setUnits (const char *units) |
| Variable | getVar () |
| GridSpec | getSpec () |
| int | getSpec (GridSpec &spec) |
| int | allocData () |
| int | allocLocate () |
| int | setValue (int x, int y, float val) |
| float | getValue (int x, int y) |
| float | getValue1 (int x, int y) |
| float | getValue (GridPoint gpt) |
| float | getValue (EarthPoint ept) |
| float | getValue (Point pt) |
| bool | isLocate () |
| bool | isData () |
| bool | isValue () |
| int | setLocate (int x, int y, Point &pt) |
| int | getLocate (int x, int y, Point &pt) |
| Point | getLocate (int x, int y) |
| float | getAverage () |
| int | getRange (float &min, float &max) |
| int | getRange (Range &range) |
| int | scale (float scale) |
| int | offset (float offset) |
| int | print () |
| int | printInfo () |
| int | printStats () |
| int | printData () |
Static Public Member Functions | |
| static int | copyInfo (Grid &grid1, const Grid &grid2) |
| static int | copyData (Grid &grid1, const Grid &grid2) |
| static int | copy (Grid &grid1, const Grid &grid2) |
This class defines a grid.
| Grid::Grid | ( | int | rnx, | |
| int | rny | |||
| ) |
Constructor for Grid Initializes the grid parameters.
References allocData(), init(), and setSize().
| Grid::Grid | ( | const Grid & | grid | ) |
Copy constructor for the grid class
| grid | Grid class to copy from |
| Grid::~Grid | ( | ) |
Destructor for Grid Deletes allocated data for grid (if needed).
| int Grid::allocData | ( | ) |
Allocates the gridpoints for the grid
References WXP::Const::MISS.
Referenced by WXP::GridMath::add(), WXP::GridMath::cutoff(), WXP::GridMath::diff(), WXP::GridMath::div(), WXP::UpaXSectCont::draw(), Grid(), WXP::GridMath::interp(), WXP::GridMath::locatePoint(), WXP::GridMath::mult(), WXP::GribFile::readBDB(), WXP::GribFile::readDS(), WXP::GridMath::remap(), and WXP::GridPiece::set().
| int Grid::allocLocate | ( | ) |
Allocates the location points for the grid
Referenced by WXP::UpaXSectCont::draw().
| float Grid::getAverage | ( | ) |
| DateVal Grid::getDateVal | ( | ) |
Get the date from the grid
References WXP::Date::get().
Referenced by WXP::GribFile::makeDatim().
| const char * Grid::getDatim | ( | ) |
Gets the date/time string
| int Grid::getDomain | ( | Domain & | dom | ) |
Gets the domain of the grid
| dom | The Domain class to put parameters |
| Domain Grid::getDomain | ( | ) |
Gets the domain of the grid
Referenced by WXP::GridMath::adjustUV(), WXP::GridPlot::getDomain(), and WXP::GridCont::getDomain().
| DomainVal Grid::getDomainVal | ( | ) |
Gets the domain of the grid
References WXP::Domain::get().
Referenced by WXP::GridMath::isDomainEqual(), WXP::GridMath::isProjEqual(), and WXP::GribFile::readBDB().
| float Grid::getDx | ( | ) |
| float Grid::getDy | ( | ) |
| float Grid::getForeHour | ( | ) |
Gets the forecast time of the grid
| t | Input forecast time class |
| int Grid::getForeSecs | ( | ) |
Gets the forecast time of the grid
| t | Input forecast time class |
| ForeTime Grid::getForeTime | ( | ) |
Gets the forecast time of the grid
| int Grid::getForeTime | ( | ForeTime & | t | ) |
Gets the forecast time of the grid
| t | Input forecast time class |
Referenced by WXP::GribFile::makeDatim(), and WXP::GribFile::makeInfo().
| const char * Grid::getInfo | ( | ) |
Gets the content/information string
| int Grid::getLevel | ( | Level & | l | ) |
Gets the vertical level of the grid
| l | Input Level class |
Referenced by WXP::GribFile::makeInfo().
| int Grid::getLevelType | ( | ) |
Get the vertical level type
| int Grid::getNx | ( | ) |
Gets the number of gridpoints in X
Referenced by WXP::GridPiece::add(), WXP::GridMath::add(), WXP::GridMath::adjustUV(), WXP::GridMath::cutoff(), WXP::GridMath::diff(), WXP::GridMath::div(), WXP::GridMath::interp(), WXP::GridMath::locatePoint(), WXP::GridMath::max(), WXP::GridMath::maxSpd(), WXP::GridMath::min(), WXP::GridMath::mult(), WXP::GridMath::offset(), WXP::GribFile::readDS(), WXP::GridMath::remap(), WXP::GridMath::scale(), and WXP::GridMath::units().
| int Grid::getNy | ( | ) |
Gets the number of gridpoints in Y
Referenced by WXP::GridPiece::add(), WXP::GridMath::add(), WXP::GridMath::adjustUV(), WXP::GridMath::cutoff(), WXP::GridMath::diff(), WXP::GridMath::div(), WXP::GridMath::interp(), WXP::GridMath::locatePoint(), WXP::GridMath::max(), WXP::GridMath::maxSpd(), WXP::GridMath::min(), WXP::GridMath::mult(), WXP::GridMath::offset(), WXP::GribFile::readDS(), WXP::GridMath::remap(), WXP::GridMath::scale(), and WXP::GridMath::units().
| int Grid::getProj | ( | ) |
| int Grid::getRange | ( | float & | min, | |
| float & | max | |||
| ) |
Gets the max and min values from the grid
| min | Minimum value of grid | |
| max | Maximum value of grid |
References WXP::Const::MISS.
| int Grid::getSize | ( | int & | x, | |
| int & | y | |||
| ) |
Gets the size of the grid
| x | The number of gridpoints in X | |
| y | The number of gridpoints in Y |
| int Grid::getSource | ( | ) |
| int Grid::getSpec | ( | GridSpec & | gs | ) |
Outputs grid specifications to GridSpec class
| Output | GridSpec class |
References WXP::GridSpec::set().
| GridSpec Grid::getSpec | ( | ) |
Outputs grid specifications to GridSpec class
References WXP::GridSpec::set().
Referenced by WXP::RadMask::getGrids().
| int Grid::getType | ( | ) |
Get the grid type
| float Grid::getValue | ( | Point | pt | ) |
Gets a value from the grid
| pt | Point class specifying projection location |
References getValue(), and WXP::Domain::tran().
| float Grid::getValue | ( | EarthPoint | ept | ) |
Gets a value from the grid
| ept | Earthpoint class specifying location (lat,lon) |
References getValue(), and WXP::Domain::tran().
| float Grid::getValue | ( | GridPoint | gpt | ) |
Gets a value from the grid
| gpt | Gridpoint class specifying location |
References WXP::Const::MISS.
| float Grid::getValue | ( | int | x, | |
| int | y | |||
| ) |
Gets a value from the grid
| x | X location in grid | |
| y | Y location in grid |
References WXP::Const::MISS.
Referenced by WXP::GridPiece::add(), WXP::GridMath::add(), WXP::GridMath::adjustUV(), WXP::GridVect::callback(), WXP::GridPlot::callback(), WXP::GridCont::callback(), WXP::GridMath::cutoff(), WXP::GridMath::diff(), WXP::GridMath::div(), getValue(), WXP::GridMath::interp(), WXP::ImageMath::maskGreater(), WXP::ImageMath::maskLesser(), WXP::GridMath::maxSpd(), WXP::GridMath::mult(), WXP::GridMath::offset(), WXP::GribFile::readBDB(), WXP::GridMath::remap(), WXP::GridMath::scale(), and WXP::GridMath::units().
| Variable Grid::getVar | ( | ) |
Gets the variable parameters
| int Grid::getVersion | ( | ) |
Gets the version number
| int Grid::init | ( | ) |
Initializes the data in the Grid class
References WXP::Domain::init(), WXP::Date::init(), and WXP::Const::MISS.
Referenced by WXP::GridMath::diff(), WXP::GridMath::div(), WXP::GribFile::getHeader(), Grid(), WXP::GridMath::mult(), and WXP::GribFile::read().
| int Grid::offset | ( | float | offset | ) |
Offsets the values in a grid
| offset | Offsets factor to apply |
References WXP::Const::MISS.
Assignment operator. Used to overload copying
| grid | String class to copy from |
| int Grid::print | ( | ) |
Prints class information to standard output
References WXP::String::get(), and WXP::Domain::print().
Referenced by WXP::RcmPlot::draw().
| int Grid::printInfo | ( | ) |
Prints basic grid information to standard output
References WXP::String::get().
| int Grid::scale | ( | float | scale | ) |
| int Grid::setDate | ( | DateVal & | dv | ) |
| int Grid::setDate | ( | Date & | d | ) |
| int Grid::setDatim | ( | const char * | str | ) |
Sets the date/time string
| str | Date/time string |
References WXP::StrLib::copy().
Referenced by WXP::RcmPlot::draw(), and WXP::GribFile::makeDatim().
| int Grid::setDomain | ( | DomainVal & | dv | ) |
Sets the domain of the grid.
| dv | DomainVal struct containing domain parameters |
References WXP::DomainVal::nx, WXP::DomainVal::ny, and WXP::Domain::set().
Referenced by WXP::GribFile::getHeader(), WXP::GribFile::read(), WXP::GridMath::remap(), and WXP::GridPiece::set().
| int Grid::setForeTime | ( | ForeTime & | t | ) |
Sets the forecast time of the grid
| t | Input forecast time class |
References WXP::VarSpec::set().
| int Grid::setForeTime | ( | const char * | str | ) |
Sets the forecast time of the grid
| t | Input forecast time class |
References WXP::VarSpec::set(), and WXP::ForeTime::set().
Referenced by WXP::GribFile::setPDB().
| int Grid::setGenName | ( | const char * | str | ) |
Sets the model generation name
| str | Name |
References WXP::StrLib::copy().
Referenced by WXP::GribFile::setPDB().
| int Grid::setInfo | ( | const char * | str | ) |
Sets the grid content/information string
| str | The string use for information |
References WXP::StrLib::copy().
Referenced by WXP::GridMath::add(), WXP::GridMath::diff(), WXP::GridMath::div(), WXP::UpaPlot::draw(), WXP::SfcPlot::draw(), WXP::MosPlot::draw(), WXP::GridPlot::draw(), WXP::GridMath::locatePoint(), WXP::GribFile::makeInfo(), and WXP::GridMath::mult().
| int Grid::setLevel | ( | Level & | l | ) |
| int Grid::setLevel | ( | const char * | str | ) |
Sets the vertical level of the grid
| l | Input Level class |
References WXP::VarSpec::set(), and WXP::Level::set().
Referenced by WXP::GribFile::setPDB().
| int Grid::setLocate | ( | int | x, | |
| int | y, | |||
| Point & | pt | |||
| ) |
Sets a location in the grid
| x | X location in grid | |
| y | Y location in grid | |
| pt | Location of gridpoint on projection |
References WXP::Point::x, and WXP::Point::y.
Referenced by WXP::UpaXSectCont::draw().
| int Grid::setSize | ( | int | x, | |
| int | y | |||
| ) |
Sets the grid size
| x | The number of gridpoints in X | |
| y | The number of gridpoints in Y |
References WXP::Domain::set().
Referenced by WXP::UpaXSectCont::draw(), and Grid().
| int Grid::setSource | ( | int | val | ) |
| int Grid::setType | ( | int | val | ) |
| int Grid::setValue | ( | int | x, | |
| int | y, | |||
| float | val | |||
| ) |
Sets a value in the grid
| x | X location in grid | |
| y | Y location in grid | |
| val | Value to put into grid |
Referenced by WXP::GridPiece::add(), WXP::GridMath::add(), WXP::GridMath::adjustUV(), WXP::GridMath::cutoff(), WXP::GridMath::diff(), WXP::GridMath::div(), WXP::UpaXSectCont::draw(), WXP::GridMath::interp(), WXP::GridMath::locatePoint(), WXP::GridMath::max(), WXP::GridMath::min(), WXP::GridMath::mult(), WXP::GridMath::offset(), WXP::GribFile::readBDB(), WXP::GribFile::readDS(), WXP::GridMath::remap(), WXP::GridMath::scale(), and WXP::GridMath::units().
| int Grid::setVar | ( | Variable & | v | ) |
| int Grid::setVar | ( | const char * | str | ) |
Sets the variable parameters
| v | Input variable class |
References WXP::Variable::print(), WXP::VarSpec::set(), and WXP::Variable::set().
| int Grid::setVersion | ( | int | val | ) |
Sets the version of the data
| val | The version number |
Referenced by WXP::GribFile::setPDB().
Translates coordinates from the domain of the grid to another domain
| pt1 | Input point on grid projection plane | |
| dom | Secondary domain |
| pt2 | Output point on secondary projection plane |
References WXP::Domain::translate().
Translates coordinates from another domain to the domain of the grid
| dom | Secondary domain | |
| pt1 | Input point on secondary projection plane |
| pt2 | Output point on grid projection plane |
References WXP::Domain::translate().
| int Grid::tran | ( | GridPoint | gpt, | |
| EarthPoint & | ept | |||
| ) |
Translates coordinates given the domain of the grid
| gpt | Input grid point |
| ept | Output earth point |
References WXP::Domain::tran().
| int Grid::tran | ( | EarthPoint | ept, | |
| GridPoint & | gpt | |||
| ) |
Translates coordinates given the domain of the grid
| ept | Input earth point |
| gpt | Output grid point |
References WXP::Domain::tran().
Translates coordinates given the domain of the grid
| pt | Input point on projection plane |
| gpt | Output grid point |
References WXP::Domain::tran().
Translates coordinates given the domain of the grid
| gpt | Input grid point |
| pt | Output point on projection plane |
References WXP::Domain::tran().
| int Grid::tran | ( | Point | pt, | |
| EarthPoint & | ept | |||
| ) |
Translates coordinates given the domain of the grid
| pt | Input point on projection plane |
| ept | Output earth point |
References WXP::Domain::tran().
| int Grid::tran | ( | EarthPoint | ept, | |
| Point & | pt | |||
| ) |
Translates coordinates given the domain of the grid
| ept | Input earth point |
| pt | Output point on projection plane |
References WXP::Domain::tran().
Referenced by WXP::GridVect::callback(), WXP::GridPlot::callback(), WXP::GridCont::callback(), WXP::GridMath::locatePoint(), WXP::GridMath::remap(), and WXP::GridBox::set().
1.6.1