| WXP C++ Library Version 6.74.9
    | 
This class opens and reads grid file data. More...
#include "../include/GridFile.h"
| Public Types | |
| enum | Type { UNK , WXP , WXPB , NETCDF , GRIB } | 
| Public Member Functions | |
| GridFile () | |
| GridFile (const char *filename, int access, int type) | |
| GridFile (const char *filename) | |
| GridFile (Filename &filename, int access, int type) | |
| GridFile (Filename &filename) | |
| ~GridFile () | |
| int | initClass () | 
| int | init () | 
| int | setVer (int v) | 
| int | setParam (const char *str) | 
| int | useHdrFile (bool val) | 
| int | setMaxBad (int val) | 
| int | setMissValue (float rmiss) | 
| int | setValueBits (int val) | 
| int | setFormat (const char *rform) | 
| int | open (const char *filename, int access, int type) | 
| int | open (const char *filename) | 
| int | open (Filename &filename, int access, int type) | 
| int | open (Filename &filename) | 
| bool | isOpen () | 
| int | getType () | 
| int | close () | 
| int | rewind () | 
| int | peek (Grid &grid) | 
| int | read (Grid &grid) | 
| int | read (const char *filename, int type, Grid &grid) | 
| int | read (const char *filename, Grid &grid) | 
| int | readHdr (Grid &grid) | 
| int | readData (Grid &grid) | 
| int | read (Grid &grid, const char *spec) | 
| int | read (GridSpec &spec, Grid &grid) | 
| int | read (Grids &grids) | 
| int | write (Grid &grid) | 
| int | write (const char *filename, int type, Grid &grid) | 
| int | write (const char *filename, Grid &grid) | 
| Static Public Member Functions | |
| static int | checkType (const char *filename) | 
This class opens and reads grid file data.
| GridFile::GridFile | ( | ) | 
Constructor. Initializes class data
References init().
| GridFile::GridFile | ( | const char * | filename, | 
| int | access, | ||
| int | type | ||
| ) | 
Constructor. Initializes and opens files for read or write.
| filename | Name of file to open | 
| access | Read or write access | 
| type | Type of file to create | 
References open().
| GridFile::GridFile | ( | const char * | filename | ) | 
Constructor. Initializes and opens specific file
| filename | Name of file to open | 
References open(), and WXP::FileAttr::READ.
| GridFile::GridFile | ( | Filename & | filename, | 
| int | access, | ||
| int | type | ||
| ) | 
Constructor. Initializes and opens files for read or write.
| filename | Name of file to open | 
| access | Read or write access | 
| type | Type of file to create | 
References open().
| GridFile::GridFile | ( | Filename & | filename | ) | 
Constructor. Initializes and opens specific file
| filename | Name of file to open | 
References open(), and WXP::FileAttr::READ.
| GridFile::~GridFile | ( | ) | 
Destructor. Closes file
References WXP::GribFile::close(), and WXP::GridWxpFile::close().
| 
 | static | 
Checks the type of input file
| filename | The file to check | 
References WXP::File::close(), WXP::StrLib::equal(), WXP::File::isOpen(), WXP::FileTool::isStdio(), and WXP::File::read().
| int GridFile::close | ( | ) | 
Closes the file
References WXP::GribFile::close(), and WXP::GridWxpFile::close().
| int GridFile::getType | ( | ) | 
Gets the type of file
| int GridFile::init | ( | ) | 
Initializes class parameters
Referenced by GridFile(), open(), and open().
| bool GridFile::isOpen | ( | ) | 
Returns true if file opened
Referenced by WXP::GridCont::getDomain(), WXP::GridPlot::getDomain(), WXP::GridVect::getDomain(), and WXP::ImagePlot::getDomain().
| int GridFile::open | ( | const char * | filename | ) | 
opens specific file
| filename | Name of file to open | 
References open(), and WXP::FileAttr::READ.
| int GridFile::open | ( | const char * | filename, | 
| int | raccess, | ||
| int | rtype | ||
| ) | 
Opens the grid file
| filename | Filename to open | 
| raccess | File access to use (FileAttr::READ, FileAttr::WRITE) | 
| rtype | Type of file to open (GridFile::WXP, GridFile::GRIB) | 
References checkType(), init(), WXP::GribFile::isOpen(), WXP::GridWxpFile::isOpen(), WXP::GridWxpFile::open(), and WXP::FileAttr::READ.
Referenced by GridFile(), GridFile(), GridFile(), GridFile(), open(), and open().
| int GridFile::open | ( | Filename & | filename | ) | 
opens specific file
| filename | Name of file to open | 
References open(), and WXP::FileAttr::READ.
| int GridFile::open | ( | Filename & | filename, | 
| int | raccess, | ||
| int | rtype | ||
| ) | 
Opens the grid file
| filename | Filename to open | 
| raccess | File access to use (FileAttr::READ, FileAttr::WRITE) | 
| rtype | Type of file to open (GridFile::WXP, GridFile::GRIB) | 
References checkType(), WXP::Filename::getName(), init(), WXP::GribFile::isOpen(), WXP::GridWxpFile::isOpen(), WXP::GridWxpFile::open(), WXP::FileAttr::READ, and WXP::GribFile::useHdrFile().
| int GridFile::peek | ( | Grid & | grid | ) | 
Queries information from the current grid
| grid | Grid class to put grid data | 
References WXP::FileAttr::READ, and WXP::GridWxpFile::read().
| int GridFile::read | ( | Grid & | grid | ) | 
Reads a grid from the grid file
| grid | Grid class to put grid data | 
References WXP::FileAttr::READ, WXP::GribFile::read(), and WXP::GridWxpFile::read().
Referenced by WXP::GridPlot::getDomain(), and WXP::ImagePlot::getDomain().
| int GridFile::rewind | ( | ) | 
Rewinds the file
| int GridFile::useHdrFile | ( | bool | val | ) | 
Sets whether the use the header file or not
| val | true=use header file, false=don't use header file | 
References WXP::GribFile::useHdrFile().