WXP C++ Library Version 6.74.9
|
This class reads satellite imagery in GINI format. More...
#include "../include/GiniFile.h"
Public Types | |
enum | Type { UNK , GINI , GINIZ , GINIP } |
Public Member Functions | |
GiniFile () | |
GiniFile (const char *filename, int rtype) | |
~GiniFile () | |
int | init () |
int | open (const char *filename, int rtype) |
int | open (const char *filename, int raccess, int rtype) |
bool | isOpen () |
int | rewind () |
int | close () |
int | getHeader (Image &data) |
int | read (Image &data) |
int | readHeader (Image &data) |
int | readData (Image &data) |
int | write (Image &data) |
int | writeHeader (Image &data) |
int | writeData (Image &data) |
This class reads satellite imagery in GINI format.
GiniFile::GiniFile | ( | ) |
Constructor. Initializes the class
References init().
GiniFile::GiniFile | ( | const char * | filename, |
int | rtype | ||
) |
GiniFile::~GiniFile | ( | ) |
Destructor
References close().
int GiniFile::close | ( | ) |
Closes the file
References WXP::File::close().
Referenced by WXP::ImageFile::close(), readHeader(), and ~GiniFile().
int GiniFile::init | ( | ) |
Initializes the class data
References WXP::Buffer::init(), and WXP::FileAttr::READ.
Referenced by GiniFile(), and GiniFile().
bool GiniFile::isOpen | ( | ) |
int GiniFile::open | ( | const char * | filename, |
int | rtype | ||
) |
Opens a satellite image file
filename | File to open |
rtype | Type of GINI file (GINI, GINIZ) |
References WXP::File::isOpen(), and WXP::File::open().
Referenced by GiniFile(), WXP::ImageFile::open(), and WXP::SatFile::open().
int GiniFile::read | ( | Image & | image | ) |
Reads in a GINI formatted image file
image | Image class to put satellite image |
References WXP::File::isOpen(), readData(), and readHeader().
Referenced by WXP::SatFile::read(), and WXP::ImageFile::read().
int GiniFile::readData | ( | Image & | image | ) |
Reads in GINI formatted image data
image | Image class to put satellite image |
References WXP::Image::allocData(), WXP::Buffer::clear(), WXP::Buffer::clearUsed(), WXP::Zlib::decomp(), WXP::Buffer::equal(), WXP::Zlib::finish(), WXP::Buffer::get(), WXP::Buffer::getAvail(), WXP::Buffer::getSize(), WXP::Zlib::getStatus(), WXP::Zlib::init(), WXP::Wxp::isDebug(), WXP::Zlib::isError(), WXP::File::isOpen(), WXP::Wxp::outDebug(), WXP::Zlib::print(), WXP::File::read(), WXP::Image::setPixel(), WXP::Zlib::STREAM_END, and WXP::Buffer::trunc().
Referenced by read().
int GiniFile::readHeader | ( | Image & | image | ) |
Reads in GINI formatted image header
image | Image class to put header information |
References WXP::DomainVal::clat, WXP::Buffer::clear(), WXP::Buffer::clearUsed(), WXP::DomainVal::clon, close(), WXP::DateTool::createLabel(), WXP::DateVal::day, WXP::Zlib::decomp(), WXP::DomainVal::dx, WXP::DomainVal::dy, WXP::Buffer::get(), WXP::File::getLine(), WXP::DateVal::hour, WXP::Zlib::init(), WXP::Wxp::isDebug(), WXP::File::isOpen(), WXP::Domain::LAMB, WXP::EarthPoint::lat, WXP::EarthPoint::lon, WXP::Domain::MERC, WXP::DateVal::min, WXP::DateVal::month, WXP::DomainVal::nx, WXP::DomainVal::ny, WXP::Wxp::outDebug(), WXP::Wxp::outWarning(), WXP::DomainVal::param, WXP::DomainVal::plat, WXP::DomainVal::plon, WXP::Zlib::print(), WXP::DomainVal::proj, WXP::Domain::PSTEREO, WXP::File::read(), WXP::DateVal::sec, WXP::Domain::set(), WXP::SatTool::toIRG7Temp(), WXP::Domain::tran(), WXP::Point::x, WXP::Point::y, and WXP::DateVal::year.
Referenced by WXP::SatFile::getHeader(), and read().
int GiniFile::rewind | ( | ) |
Rewinds the file
References WXP::File::rewind(), and WXP::File::skipLine().
int GiniFile::write | ( | Image & | image | ) |
Writes in a GINI formatted image file
image | Image class to put satellite image |
References WXP::File::isOpen().
Referenced by WXP::ImageFile::write().