WXP C++ Library Version 6.74.9
Loading...
Searching...
No Matches
WXP::SatFile Class Reference

This class reads satellite imagery from file. More...

#include "../include/SatFile.h"

Public Types

enum  Type {
  UNK , RAW , IMG , IMGZ ,
  GINI , GINIZ , GINIP , NETCDF ,
  UNISYS , AREA , TIFF , LRIT ,
  GIF , PNG
}

Public Member Functions

 SatFile ()
 SatFile (const char *filename, int raccess, int rtype)
 SatFile (const char *filename, int raccess, const char *rtype)
 SatFile (Filename &filename, int raccess)
 ~SatFile ()
int init ()
int open (const char *filename, int raccess, int rtype)
int open (const char *filename, int raccess, const char *rtype)
int open (Filename &filename, int raccess)
bool isOpen ()
int rewind ()
int close ()
int getHeader (Image &data)
int read (Image &data)
int read (const char *filename, int type, Image &image)
int read (const char *filename, const char *type, Image &image)
int read (Filename &filename, Image &image)
int write (Image &data)
int write (const char *filename, int type, Image &image)
int setMapRemove (int val)
int setDomain (const char *str)
int setCalibration (const char *str)

Static Public Member Functions

static int getType (const char *str)
static int checkType (const char *filename)

Detailed Description

This class reads satellite imagery from file.

Author
Dan Vietor

Constructor & Destructor Documentation

◆ SatFile() [1/4]

SatFile::SatFile ( )

Constructor. Initializes the class

References init().

◆ SatFile() [2/4]

SatFile::SatFile ( const char * filename,
int access,
int type )

Constructor. Opens the satellite file

Parameters
filenameFile to open
accessAccess (FileAttr::READ, FileAttr::WRITE)
typeFile type (IMG, IMGZ, GINI, GINIZ, AREA, UNISYS, TIFF, LRIT)

References init(), and open().

◆ SatFile() [3/4]

SatFile::SatFile ( const char * filename,
int access,
const char * type )

Constructor. Opens the satellite file

Parameters
filenameFile to open
accessAccess (FileAttr::READ, FileAttr::WRITE)
typeFile type (img, imgz, gini, giniz, area, unisys, tiff, lrit)

References init(), and open().

◆ SatFile() [4/4]

SatFile::SatFile ( Filename & filename,
int access )

Constructor. Opens the satellite file

Parameters
filenameFile to open
accessAccess (FileAttr::READ, FileAttr::WRITE)
typeFile type (img, imgz, gini, giniz, area, unisys, tiff, lrit)

References WXP::Filename::getName(), WXP::Filename::getType(), init(), and open().

◆ ~SatFile()

SatFile::~SatFile ( )

Destructor

References close().

Member Function Documentation

◆ checkType()

int SatFile::checkType ( const char * filename)
static

Check the type of data in the file

Parameters
filenameFile to check

References WXP::StrLib::equal().

Referenced by open().

◆ close()

int SatFile::close ( )

Closes the file

Referenced by ~SatFile().

◆ getHeader()

int SatFile::getHeader ( Image & image)

Reads the image header

Return values
imageImage class to put header information

References WXP::Image::init().

Referenced by WXP::SatPlot::getDomain().

◆ init()

int SatFile::init ( )

Initializes the class data

References WXP::Const::MISS.

Referenced by SatFile(), SatFile(), SatFile(), and SatFile().

◆ isOpen()

bool SatFile::isOpen ( )

Is file open

Returns
True if open

Referenced by WXP::SatPlot::draw(), and WXP::SatPlot::getDomain().

◆ open() [1/2]

int SatFile::open ( const char * filename,
int access,
const char * rtype )

Opens a satellite image file

Parameters
filenameFile to open
accessAccess (File::READ, File::WRITE)
rtypeFile type (unk, img, imgz, gini, giniz, area, unisys)

References open().

◆ open() [2/2]

int SatFile::open ( const char * filename,
int access,
int rtype )

Opens a satellite image file

Parameters
filenameFile to open
accessAccess (File::READ, File::WRITE)
rtypeFile type (UNK, IMG, IMGZ, GINI, GINIZ, AREA, UNISYS)

References checkType(), WXP::ImgWxpFile::IMG, WXP::ImgWxpFile::IMGZ, WXP::FileAttr::READ, and WXP::FileAttr::WRITE.

Referenced by WXP::SatPlot::getDomain(), open(), SatFile(), SatFile(), and SatFile().

◆ read()

int SatFile::read ( Image & image)

Reads the image in from the file

Return values
imageImage class to put satellite image

References WXP::Image::init().

Referenced by WXP::SatPlot::draw().

◆ rewind()

int SatFile::rewind ( )

Rewinds the file

◆ setCalibration()

int SatFile::setCalibration ( const char * str)

Sets the calibration factor

Parameters
strThe calibration

Referenced by WXP::SatPlot::draw().

◆ setDomain()

int SatFile::setDomain ( const char * str)

Sets the domain of the image for navigation

Parameters
strThe domain of the image

Referenced by WXP::SatPlot::draw().

◆ setMapRemove()

int SatFile::setMapRemove ( int val)

Enables map removal algorithm

Parameters
strTurns on map removal

Referenced by WXP::SatPlot::draw().


The documentation for this class was generated from the following files: