WXP C++ Library Version 6.74.9
|
This class stores and manipulates domain data. More...
#include "../include/Domain.h"
Public Types | |
enum | TranLocate { UL , UR , LL , LR , CENTER } |
Public Member Functions | |
Domain () | |
Domain (const char *str) | |
Domain (DomainVal &val) | |
int | init () |
int | set (DomainVal &val) |
int | set (const char *str) |
int | set (EarthPoint &ul, EarthPoint &lr, int rnx, int rny) |
int | set (int rnx, int rny) |
DomainVal | get () |
bool | isSet () |
int | setParam () |
int | setLimits () |
int | getLimits (Rect &rect) |
Rect | getLimits () |
int | setView (Rect &rect) |
int | getProj () |
float | getPLat () |
float | getPLon () |
float | getCLat () |
float | getCLon () |
int | getNx () |
int | getNy () |
float | getDx () |
float | getDy () |
float | getParam (int i) |
int | tranCenter (Point &pt) |
float | getAspect () |
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 (EarthPoints &epts, Points &pts) |
int | tran (EarthPoints &epts, GridPoints &gpts) |
int | tran (int w, EarthPoint &ept) |
int | tran (int w, GridPoint &gpt) |
int | tran (int w, Point &pt) |
bool | within (Point &pt) |
bool | within (EarthPoint &ept) |
bool | withinExt (Point &pt, int ext) |
bool | withinExt (EarthPoint &ept, int ext) |
int | where (Point &pt) |
int | where (EarthPoint &ept) |
int | scaleSize (int width, int height) |
int | scaleGrid (float scale) |
int | zoom (Point &pt, float zfac) |
int | pan (Point &pt) |
int | adjust (Point &pt) |
int | adjust (Points &pts) |
float | adjustDir (float dir, Point &pt) |
float | adjustDir (float dir, EarthPoint &ept) |
float | unadjustDir (float dir, Point &pt) |
float | unadjustDir (float dir, EarthPoint &ept) |
int | offset (Point &pt, float dir, float rad, Point &opt) |
float | direct (Point &pt1, Point &pt2) |
float | getVert () |
float | getMapFactor (EarthPoint &ept) |
int | wrapLine (Point &pt1, Point &pt2) |
int | wrapLine (Points &pts) |
int | offsetLine (Point &pt1, Point &pt2, int flag) |
int | offsetLine (Points &pts, int flag) |
int | toString (String &string) |
int | print () |
int | printLimits () |
int | isProj (int p) |
int | isMap () |
int | isTherm () |
int | isCoord () |
int | isPolar () |
Static Public Member Functions | |
static int | getProj (const char *proj) |
static bool | compare (Domain &dom1, Domain &dom2) |
static bool | compareProj (Domain &dom1, Domain &dom2) |
static int | translate (Domain &dom1, Domain &dom2, Point &pt1, Point &pt2) |
static int | translate (Domain &dom1, Domain &dom2, GridPoint &gpt1, GridPoint &gpt2) |
static float | calcEarthDist (EarthPoint &ept1, EarthPoint &ept2) |
static int | offsetLatLon (EarthPoint &ept, float dir, float rad, EarthPoint &opt) |
static bool | isMap (int a) |
static bool | isTherm (int a) |
static bool | isCoord (int a) |
static bool | isPolar (int a) |
Static Public Attributes | |
static double | earth_rad = 63.7122 |
static double | earth_maj = 63.78137 |
static double | earth_min = 63.56752 |
static const int | PSTEREO = DomainVal::PSTEREO |
static const int | LATLON = DomainVal::LATLON |
static const int | MERC = DomainVal::MERC |
static const int | LAMB = DomainVal::LAMB |
static const int | ORTHO = DomainVal::ORTHO |
static const int | GNOM = DomainVal::GNOM |
static const int | MOLL = DomainVal::MOLL |
static const int | LAMBAZ = DomainVal::LAMBAZ |
static const int | ALBERS = DomainVal::ALBERS |
static const int | SAT = DomainVal::SAT |
static const int | RADIAL = DomainVal::RADIAL |
static const int | PIXEL = DomainVal::PIXEL |
static const int | XY = DomainVal::XY |
static const int | XZ = DomainVal::XZ |
static const int | XP = DomainVal::XP |
static const int | XLOGP = DomainVal::XLOGP |
static const int | POLAR = DomainVal::POLAR |
static const int | CAT = DomainVal::CAT |
static const int | SKEWT = DomainVal::SKEWT |
static const int | STUVE = DomainVal::STUVE |
static const int | EMA = DomainVal::EMA |
static const int | TEPH = DomainVal::TEPH |
static const int | RTEPH = DomainVal::RTEPH |
static const int | ZOOM = DomainVal::ZOOM |
static const int | SIZE = DomainVal::SIZE |
static float | OFFSET_LL = 360 |
static float | OFFSET_MERC = 360*63.7122*.017453293 |
This class stores and manipulates domain data.
Domain::Domain | ( | ) |
Constructor. Initializes parameters.
References init().
Domain::Domain | ( | const char * | str | ) |
Domain::Domain | ( | DomainVal & | val | ) |
int Domain::adjust | ( | Point & | pt | ) |
Resets a point to make sure its within the domain
pt | Point |
References LATLON, MERC, OFFSET_MERC, WXP::DomainVal::proj, and WXP::Point::x.
Referenced by adjust().
int Domain::adjust | ( | Points & | pts | ) |
Resets points to make sure they are in domain
pts | Set of points to check |
References adjust(), WXP::Points::get(), WXP::Points::getNum(), and WXP::Points::set().
float Domain::adjustDir | ( | float | dir, |
EarthPoint & | ept | ||
) |
Adjusts a direction from earth direction to projection direction (0=up in projection)
dir | Wind direction relative to north |
ept | Location in lat/lon |
References adjustDir(), and tran().
float Domain::adjustDir | ( | float | dir, |
Point & | pt | ||
) |
Adjusts a direction from earth direction to projection direction (0=up in projection)
dir | Wind direction relative to north |
pt | Location on the projection |
References WXP::Const::DRC, LAMB, WXP::EarthPoint::lat, WXP::EarthPoint::lon, WXP::Const::MISS, WXP::DomainVal::plat, WXP::DomainVal::plon, WXP::DomainVal::proj, PSTEREO, WXP::Const::RDC, SAT, tran(), WXP::Point::x, and WXP::Point::y.
Referenced by WXP::NidsImage::addSite(), adjustDir(), WXP::Grid::adjustDir(), WXP::GridMath::adjustUV(), WXP::MosRaw::compute(), WXP::SfcRaw::compute(), WXP::UpaRaw::compute(), WXP::Lev2Plot::draw(), and WXP::NidsImage::setImage().
|
static |
Compute the spherical distance between two points in meters
ept1 | First point (lat,lon) |
ept2 | Second point (lat,lon) |
References WXP::Calc::earthDist(), WXP::EarthPoint::lat, and WXP::EarthPoint::lon.
Referenced by WXP::ProfPlot::draw(), WXP::UpaXSectCont::draw(), and WXP::UpaXSectPlot::draw().
Compares two domain specifications for full domain match.
dom1 | First domain |
dom2 | Second domain |
References WXP::DomainVal::compare().
Compares two domain specifications for projection match.
dom1 | First domain |
dom2 | Second domain |
References WXP::DomainVal::compareProj().
Referenced by translate(), and translate().
Outputs direction between two points. actual distance on the face of earth.
pt1 | First location on projection plane |
pt2 | Second location on projection plane |
References WXP::DomainVal::plat, WXP::DomainVal::proj, PSTEREO, WXP::Const::RDC, WXP::Point::x, and WXP::Point::y.
DomainVal Domain::get | ( | ) |
Gets the domain parameters.
References WXP::DomainVal::clat, WXP::DomainVal::clon, WXP::DomainVal::dx, WXP::DomainVal::dy, WXP::DomainVal::ellipse, WXP::DomainVal::nx, WXP::DomainVal::ny, WXP::DomainVal::param, WXP::DomainVal::plat, WXP::DomainVal::plon, and WXP::DomainVal::proj.
Referenced by WXP::Lev2Plot::draw(), WXP::Grid::getDomainVal(), WXP::GridMath::isDomainEqual(), WXP::GridMath::isProjEqual(), WXP::ImageMath::remap(), and WXP::Image::set().
float Domain::getAspect | ( | ) |
Gets the aspext ratio of the domain.
References WXP::DomainVal::nx, and WXP::DomainVal::ny.
|
inline |
|
inline |
|
inline |
Returns grid spacing in X
References WXP::DomainVal::dx.
Referenced by WXP::Lev2Plot::draw(), WXP::Grid::getDx(), WXP::Image::getDx(), WXP::ImageMath::merge(), and WXP::ImgWxpFile::write().
|
inline |
Returns grid spacing in Y
References WXP::DomainVal::dy.
Referenced by WXP::RedbookPlot::draw(), WXP::Grid::getDy(), WXP::ImageMath::merge(), and WXP::ImgWxpFile::write().
int Domain::getLimits | ( | Rect & | rect | ) |
Gets the domain limits
rect | Rect containing limits of domain. |
Referenced by WXP::ImagePlot::drawImage(), and WXP::Image::getLimits().
float Domain::getMapFactor | ( | EarthPoint & | ept | ) |
Outputs map factor. This is a correction from projection space to actual distance on the face of earth.
ept | Location on the earth (lat,lon) |
References WXP::Const::DRC, LAMB, WXP::EarthPoint::lat, MERC, WXP::DomainVal::plat, WXP::DomainVal::proj, PSTEREO, and RADIAL.
Referenced by WXP::NidsPlot::callback().
|
inline |
Returns number of gridpoints in X
References WXP::DomainVal::nx.
Referenced by WXP::GridPiece::add(), WXP::NidsImage::addSite(), WXP::ImagePlot::drawImage(), WXP::ImageMath::merge(), WXP::NidsImage::setImage(), and WXP::ImgWxpFile::write().
|
inline |
Returns number of gridpoints in Y
References WXP::DomainVal::ny.
Referenced by WXP::GridPiece::add(), WXP::NidsImage::addSite(), WXP::ImagePlot::drawImage(), WXP::ImageMath::merge(), WXP::NidsImage::setImage(), and WXP::ImgWxpFile::write().
|
inline |
Returns projection parameters
References WXP::Const::MISS, and WXP::DomainVal::param.
Referenced by WXP::ImgWxpFile::write().
|
inline |
Returns projection latitude
References WXP::DomainVal::plat.
Referenced by WXP::ImgWxpFile::write().
|
inline |
Returns projection longitude
References WXP::DomainVal::plon.
Referenced by WXP::ImgWxpFile::write().
|
inline |
Returns projection type
References WXP::DomainVal::proj.
Referenced by WXP::RawGrid::compute(), WXP::MosGrid::compute(), WXP::SfcGrid::compute(), WXP::UpaGrid::compute(), WXP::ImagePlot::drawImage(), WXP::Plot::drawLine(), WXP::Plot::drawSpline(), WXP::Grid::getProj(), WXP::DomainTool::proj(), WXP::ImageMath::remap(), set(), WXP::GridBox::set(), and WXP::ImgWxpFile::write().
|
static |
Returns the projection type given a descriptive string
proj | Projection string |
References ALBERS, CAT, EMA, GNOM, WXP::StrLib::iequal(), LAMB, LAMBAZ, LATLON, MERC, WXP::Const::MISS, MOLL, ORTHO, PIXEL, POLAR, WXP::DomainVal::proj, PSTEREO, RADIAL, RTEPH, SAT, SIZE, SKEWT, STUVE, TEPH, XLOGP, XP, XY, and ZOOM.
float Domain::getVert | ( | ) |
Calculate the vertical distance of the domain
References WXP::Rect::ymax, and WXP::Rect::ymin.
int Domain::init | ( | ) |
Initializes domain parameters
References earth_maj, earth_min, WXP::DomainVal::init(), WXP::Rect::init(), and WXP::Const::MISS.
Referenced by Domain(), Domain(), Domain(), WXP::ProfPlot::getDomain(), WXP::UpaXSectCont::getDomain(), WXP::UpaXSectPlot::getDomain(), WXP::RedbookPlot::getDomain(), WXP::Grid::init(), WXP::Image::init(), WXP::RedbookPlot::init(), WXP::KavradFile::readHeader(), WXP::NowradFile::readHeader(), and set().
|
inline |
Is the projection a coordinate plot
References isCoord(), and WXP::DomainVal::proj.
Referenced by isCoord().
|
inlinestatic |
|
inline |
Is the projection a map
References isMap(), and WXP::DomainVal::proj.
Referenced by WXP::MapPlot::draw(), WXP::MapPlot::drawLatLon(), isMap(), tran(), and tran().
|
inlinestatic |
|
inline |
Is the projection a polar plot
References isPolar(), and WXP::DomainVal::proj.
Referenced by isPolar().
|
inlinestatic |
Is the projection a polar plot
References POLAR.
|
inline |
Returns if projection matches p
References WXP::DomainVal::proj.
|
inline |
Returns true if domain is set to something
References WXP::Const::MISS, and WXP::DomainVal::proj.
Referenced by WXP::MosPlot::draw(), WXP::RawPlot::draw(), WXP::RedbookPlot::draw(), WXP::SfcPlot::draw(), WXP::UpaPlot::draw(), WXP::RedbookPlot::getDomain(), and WXP::GridMath::remap().
|
inline |
Is the projection a thermo diagram
References isTherm(), and WXP::DomainVal::proj.
Referenced by isTherm().
|
inlinestatic |
Offsets a point a specific radius and distance
pt | The original point |
dir | Direction in degrees |
rad | Radius in km |
opt | New point |
References offsetLatLon(), and tran().
Referenced by offsetLine(), offsetLine(), wrapLine(), and wrapLine().
|
static |
Offsets a point a specific radius and distance
ept | The original point |
dir | Direction in degrees |
rad | Radius in km |
opt | New point |
References WXP::Const::DRC, WXP::EarthPoint::lat, and WXP::EarthPoint::lon.
Referenced by WXP::Plot::drawCircle(), WXP::MdrData::getRegLoc(), WXP::MdrData::getTopsLoc(), and offset().
Offsets a line to draw at other edge of projection. This is used with wrapLine to draw a line crossing through the edge of a domain.
pt1 | First point |
pt2 | Second point |
flag | Which type of offset, 1=right to left, -1=left to right |
References earth_rad, LAMB, LATLON, MERC, MOLL, offset(), OFFSET_LL, OFFSET_MERC, WXP::Const::PI, WXP::DomainVal::proj, WXP::Point::x, and WXP::Point::y.
Referenced by WXP::Plot::drawFill(), WXP::Plot::drawLine(), WXP::Plot::drawLine(), and WXP::Plot::drawSpline().
int Domain::offsetLine | ( | Points & | pts, |
int | flag | ||
) |
Adjusts the date according to new hour
rhour | New hour |
References earth_rad, WXP::Points::getNum(), WXP::Points::getY(), LAMB, LATLON, MERC, MOLL, WXP::Points::offset(), offset(), OFFSET_LL, OFFSET_MERC, WXP::Const::PI, and WXP::DomainVal::proj.
int Domain::pan | ( | Point & | pt | ) |
Pans a domain (resets centerpoint
pt | New center point in projection space |
References WXP::DomainVal::clat, WXP::DomainVal::clon, WXP::EarthPoint::lat, WXP::EarthPoint::lon, setLimits(), and tran().
Referenced by WXP::Figure::callback().
int Domain::print | ( | ) |
Prints domain parameters to standard output.
References ALBERS, CAT, WXP::DomainVal::clat, WXP::DomainVal::clon, WXP::DomainVal::dx, WXP::DomainVal::dy, WXP::DomainVal::ellipse, EMA, GNOM, LAMB, LAMBAZ, LATLON, MERC, WXP::Const::MISS, MOLL, WXP::DomainVal::nx, WXP::DomainVal::ny, ORTHO, WXP::DomainVal::param, PIXEL, WXP::DomainVal::plat, WXP::DomainVal::plon, POLAR, WXP::DomainVal::proj, PSTEREO, RADIAL, RTEPH, SAT, SKEWT, STUVE, TEPH, XLOGP, XY, XZ, and ZOOM.
Referenced by WXP::NidsImage::addSite(), WXP::Figure::callback(), WXP::RedbookPlot::draw(), WXP::NidsPlot::getDomain(), WXP::XSectionPlot::getDomain(), WXP::Grid::print(), WXP::Image::print(), WXP::NidsData::print(), and WXP::SfcPlot::print().
int Domain::printLimits | ( | ) |
Prints the domain limits in projection coordinates
References WXP::Rect::xmax, WXP::Rect::xmin, WXP::Rect::ymax, and WXP::Rect::ymin.
int Domain::scaleGrid | ( | float | scale | ) |
Scales the number of grid points (domain stays the same)
scale | Scale factor to apply to gridpoints |
References WXP::DomainVal::dx, WXP::DomainVal::dy, WXP::DomainVal::nx, and WXP::DomainVal::ny.
Referenced by WXP::RawGrid::compute(), WXP::MosGrid::compute(), WXP::SfcGrid::compute(), and WXP::UpaGrid::compute().
int Domain::scaleSize | ( | int | width, |
int | height | ||
) |
Resets the number of gridpoints in each direction
width | New width |
height | New height |
References WXP::DomainVal::dx, WXP::DomainVal::dy, WXP::DomainVal::nx, and WXP::DomainVal::ny.
int Domain::set | ( | const char * | str | ) |
Sets the domain, parsing a string. The string can be a full domain specification (proj:param:param,clat,clon,nx,ny,dx,dy) or projection specification (proj:param:param:...).
str | The string to parse |
References WXP::DomainVal::clat, WXP::DomainVal::clon, WXP::StrLib::contains(), WXP::DomainVal::dx, WXP::DomainVal::dy, WXP::DomainVal::ellipse, getProj(), init(), WXP::Const::MISS, WXP::DomainVal::nx, WXP::DomainVal::ny, WXP::DomainVal::param, WXP::DomainVal::plat, WXP::DomainVal::plon, WXP::DomainVal::proj, and setParam().
int Domain::set | ( | DomainVal & | val | ) |
Sets the domain parameters from DomainVal structure.
val | DomainVal parameters. |
References WXP::DomainVal::clat, WXP::DomainVal::clon, WXP::DomainVal::dx, WXP::DomainVal::dy, WXP::DomainVal::ellipse, WXP::Const::MISS, WXP::DomainVal::nx, WXP::DomainVal::ny, WXP::DomainVal::param, WXP::DomainVal::plat, WXP::DomainVal::plon, WXP::DomainVal::proj, and setParam().
Referenced by WXP::MdrImage::addSite(), WXP::AreaFile::calcDomain(), WXP::ObjectAnal::compute(), WXP::DomainTool::decode(), Domain(), Domain(), WXP::NidsPlot::drawData(), WXP::HodoPlot::getDomain(), WXP::MdrPlot::getDomain(), WXP::MetaPlot::getDomain(), WXP::MeteoPlot::getDomain(), WXP::MiscPlot::getDomain(), WXP::NidsPlot::getDomain(), WXP::RcmPlot::getDomain(), WXP::SoundPlot::getDomain(), WXP::ThermPlot::getDomain(), WXP::XSectionPlot::getDomain(), WXP::RadMask::init(), WXP::TiffFile::read(), WXP::GribFile::readGDB(), WXP::GribFile::readGDS(), WXP::KavradFile::readHeader(), WXP::NowradFile::readHeader(), WXP::GiniFile::readHeader(), WXP::SatCdfFile::readHeader(), WXP::LritFile::readHeader(), WXP::Image::set(), WXP::ImagePiece::set(), WXP::Grid::setDomain(), WXP::RadMask::setDomain(), WXP::NidsImage::setImage(), and WXP::Grid::setSize().
int Domain::set | ( | EarthPoint & | ul, |
EarthPoint & | lr, | ||
int | rnx, | ||
int | rny | ||
) |
Sets the domain based on two opposite points and number of gridpoints
ul | The upper left hand coordinate |
lr | The lower right hand coordinate |
rnx | The number of gridpoints in x |
rny | The number of gridpoints in y |
References WXP::DomainVal::clat, WXP::DomainVal::clon, WXP::DomainVal::dx, WXP::DomainVal::dy, WXP::EarthPoint::lat, WXP::EarthPoint::lon, WXP::DomainVal::nx, WXP::DomainVal::ny, WXP::Point::set(), setParam(), tran(), WXP::Point::x, and WXP::Point::y.
int Domain::set | ( | int | rnx, |
int | rny | ||
) |
Sets an XY projection with grid space of 1
rnx | Number of X gridpoints |
rny | Number of Y gridpoints |
References WXP::DomainVal::clat, WXP::DomainVal::clon, WXP::DomainVal::dx, WXP::DomainVal::dy, WXP::DomainVal::nx, WXP::DomainVal::ny, WXP::DomainVal::proj, setParam(), and XY.
int Domain::setLimits | ( | ) |
Sets the domain limits.
References WXP::DomainVal::dx, WXP::DomainVal::dy, WXP::DomainVal::nx, WXP::DomainVal::ny, tranCenter(), WXP::Point::x, WXP::Rect::xmax, WXP::Rect::xmin, WXP::Point::y, WXP::Rect::ymax, and WXP::Rect::ymin.
Referenced by pan(), setParam(), and zoom().
int Domain::setParam | ( | ) |
Sets the internal domain values.
References ALBERS, WXP::DomainVal::clat, WXP::DomainVal::clon, earth_maj, earth_rad, WXP::DomainVal::ellipse, LAMB, WXP::Const::MISS, WXP::DomainVal::param, WXP::DomainVal::plat, WXP::DomainVal::plon, WXP::DomainVal::proj, PSTEREO, RADIAL, SAT, WXP::Rect::set(), and setLimits().
int Domain::toString | ( | String & | string | ) |
Prints domain parameters to standard output.
References CAT, WXP::DomainVal::clat, WXP::DomainVal::clon, WXP::DomainVal::dx, WXP::DomainVal::dy, WXP::DomainVal::ellipse, EMA, GNOM, LAMB, LAMBAZ, LATLON, MERC, WXP::Const::MISS, MOLL, WXP::DomainVal::nx, WXP::DomainVal::ny, ORTHO, WXP::DomainVal::param, PIXEL, WXP::DomainVal::plat, WXP::DomainVal::plon, POLAR, WXP::DomainVal::proj, PSTEREO, RTEPH, SAT, SKEWT, STUVE, TEPH, XLOGP, XY, XZ, and ZOOM.
Referenced by WXP::GifFile::write(), WXP::ImgWxpFile::write(), WXP::LZWComp::write(), and WXP::PngFile::write().
int Domain::tran | ( | EarthPoint & | ept, |
GridPoint & | gpt | ||
) |
Translates a EarthPoint to a GridPoint
ept | The latitude and longitude |
gpt | The gridpoint location of ept |
References tran().
int Domain::tran | ( | EarthPoint & | ept, |
Point & | pt | ||
) |
Translates an EarthPoint to a projection Point
ept | The latitude and longitude |
pt | The projection location of ept in the domain. |
References ALBERS, CAT, WXP::DomainVal::clon, WXP::Convert::CtoK(), WXP::Const::DRC, WXP::DomainVal::dx, WXP::DomainVal::dy, earth_maj, earth_min, earth_rad, WXP::DomainVal::ellipse, EMA, isMap(), LAMB, LAMBAZ, WXP::EarthPoint::lat, LATLON, WXP::EarthPoint::lon, MERC, WXP::Const::MISS, MOLL, WXP::DomainVal::nx, ORTHO, WXP::DomainVal::param, WXP::Const::PI, PIXEL, WXP::DomainVal::plat, WXP::DomainVal::plon, POLAR, WXP::Calc::potTemp(), WXP::DomainVal::proj, PSTEREO, RADIAL, WXP::Const::RDC, RTEPH, SAT, WXP::Angle::set(), SKEWT, STUVE, TEPH, WXP::Point::x, XLOGP, WXP::Rect::xmin, XP, XY, WXP::Point::y, and WXP::Rect::ymin.
Referenced by WXP::NidsImage::addSite(), adjustDir(), adjustDir(), WXP::GridMath::adjustUV(), WXP::AreaFile::calcDomain(), WXP::Plot::callback(), WXP::ObjectAnal::compute(), WXP::Lev2Plot::draw(), WXP::RedbookPlot::draw(), WXP::ContPlot::drawFill(), WXP::Plot::drawLine(), WXP::Grid::getValue(), WXP::Grid::getValue(), offset(), pan(), WXP::TiffFile::read(), WXP::GribFile::readGDB(), WXP::GribFile::readGDS(), WXP::GiniFile::readHeader(), WXP::SatCdfFile::readHeader(), WXP::LritFile::readHeader(), set(), WXP::ImagePiece::set(), WXP::NidsImage::setImage(), WXP::CityHash::setup(), tran(), WXP::Grid::tran(), WXP::Image::tran(), WXP::Grid::tran(), WXP::Image::tran(), tran(), WXP::Grid::tran(), WXP::Image::tran(), WXP::Grid::tran(), WXP::Image::tran(), tran(), tran(), WXP::Grid::tran(), WXP::Image::tran(), WXP::Grid::tran(), WXP::Image::tran(), tranCenter(), translate(), translate(), unadjustDir(), where(), within(), withinExt(), and zoom().
int Domain::tran | ( | GridPoint & | gpt, |
EarthPoint & | ept | ||
) |
Translates a GridPoint to an EarthPoint
gpt | The gridpoint location |
ept | The latitude and longitude of gpt |
References tran().
Translates a GridPoint to a projection Point
gpt | The gridpoint location in the domain. |
pt | The projection location from gpt |
References WXP::DomainVal::dx, WXP::DomainVal::dy, WXP::Const::MISS, WXP::DomainVal::proj, RADIAL, WXP::Point::x, WXP::Rect::xmin, WXP::Point::y, and WXP::Rect::ymax.
int Domain::tran | ( | int | w, |
EarthPoint & | ept | ||
) |
Translates a location to EarthPoint
w | Location (see TranLocate) |
ept | EarthPoint |
References CENTER, WXP::DomainVal::clat, WXP::DomainVal::clon, LL, LR, WXP::EarthPoint::set(), WXP::Point::set(), tran(), UL, UR, WXP::Rect::xmax, WXP::Rect::xmin, WXP::Rect::ymax, and WXP::Rect::ymin.
int Domain::tran | ( | int | w, |
GridPoint & | gpt | ||
) |
Translates a location to GridPoint
w | Location (see TranLocate) |
gpt | GridPoint |
References CENTER, WXP::DomainVal::clat, WXP::DomainVal::clon, LL, LR, WXP::EarthPoint::set(), WXP::Point::set(), tran(), UL, UR, WXP::Rect::xmax, WXP::Rect::xmin, WXP::Rect::ymax, and WXP::Rect::ymin.
int Domain::tran | ( | int | w, |
Point & | pt | ||
) |
Translates a location to Point
w | Location (see TranLocate) |
pt | Point |
References CENTER, LL, LR, WXP::Point::set(), tranCenter(), UL, UR, WXP::Rect::xmax, WXP::Rect::xmin, WXP::Rect::ymax, and WXP::Rect::ymin.
int Domain::tran | ( | Point & | pt, |
EarthPoint & | ept | ||
) |
Translates a projection Point back to an EarthPoint
pt | The projection location in the domain. |
ept | The latitude and longitude of pt |
References ALBERS, CAT, WXP::DomainVal::clon, WXP::Convert::CtoK(), WXP::Const::DRC, WXP::DomainVal::dx, WXP::DomainVal::dy, earth_maj, earth_rad, WXP::DomainVal::ellipse, EMA, isMap(), LAMB, LAMBAZ, WXP::EarthPoint::lat, LATLON, WXP::EarthPoint::lon, MERC, WXP::Const::MISS, MOLL, WXP::DomainVal::nx, ORTHO, WXP::DomainVal::param, WXP::Const::PI, PIXEL, WXP::DomainVal::plat, WXP::DomainVal::plon, POLAR, WXP::Calc::potTemp(), WXP::DomainVal::proj, PSTEREO, RADIAL, WXP::Const::RDC, RTEPH, SAT, WXP::Angle::set(), SKEWT, STUVE, TEPH, WXP::Point::x, XLOGP, WXP::Rect::xmin, XP, XY, WXP::Point::y, and WXP::Rect::ymin.
Translates a projection Point to a GridPoint
pt | The projection location in the domain. |
gpt | The gridpoint location of pt |
References WXP::DomainVal::dx, WXP::DomainVal::dy, LATLON, WXP::Const::MISS, WXP::DomainVal::proj, RADIAL, WXP::Point::x, WXP::Rect::xmin, WXP::Point::y, and WXP::Rect::ymax.
int Domain::tranCenter | ( | Point & | pt | ) |
Returns the center of the domain in projection coordinates.
pt | Point structure containing the coordinates of the center. |
References WXP::DomainVal::clat, WXP::DomainVal::clon, and tran().
Referenced by setLimits(), and tran().
Translates projection points between two different projections
dom1 | Initial domain |
dom2 | New domain |
gpt1 | Point within initial domain |
gpt2 | Location within new domain |
References compareProj(), and tran().
Translates projection points between two different projections
dom1 | Initial domain |
dom2 | New domain |
pt1 | Point within initial domain |
pt2 | Location within new domain |
References compareProj(), and tran().
Referenced by WXP::ContPlot::drawValues(), WXP::Grid::tran(), and WXP::Grid::tran().
float Domain::unadjustDir | ( | float | dir, |
EarthPoint & | ept | ||
) |
Readjusts a wind direction back to 0=north
dir | Wind direction relative to north |
ept | Location in lat/lon |
References tran(), and unadjustDir().
float Domain::unadjustDir | ( | float | dir, |
Point & | pt | ||
) |
Readjusts wind direction back to 0=north
dir | Adjusted wind direction |
pt | Point on projection direction was adjusted to |
References WXP::Const::DRC, LAMB, WXP::Const::MISS, WXP::DomainVal::plat, WXP::DomainVal::plon, WXP::DomainVal::proj, PSTEREO, WXP::Const::RDC, WXP::Point::x, and WXP::Point::y.
Referenced by unadjustDir(), and WXP::Grid::unadjustDir().
int Domain::where | ( | EarthPoint & | ept | ) |
Determines relative location of point to domain
ept | EarthPoint to locate. |
int Domain::where | ( | Point & | pt | ) |
Determines relative location of point to domain
pt | Point to locate. |
References WXP::Const::MISS, WXP::DomainVal::proj, WXP::Point::x, WXP::Rect::xmax, WXP::Rect::xmin, WXP::Point::y, WXP::Rect::ymax, and WXP::Rect::ymin.
Referenced by where().
bool Domain::within | ( | EarthPoint & | ept | ) |
Determines whether point is within domain
ept | EarthPoint to locate. |
bool Domain::within | ( | Point & | pt | ) |
Determines whether point is within domain
pt | Point to locate. |
References WXP::Const::MISS, WXP::DomainVal::proj, WXP::Point::x, WXP::Rect::xmax, WXP::Rect::xmin, WXP::Point::y, WXP::Rect::ymax, and WXP::Rect::ymin.
Referenced by within().
bool Domain::withinExt | ( | EarthPoint & | ept, |
int | ext | ||
) |
Determines whether point is within extended domain
ept | EarthPoint to locate. |
ext | How much beyond the edge of domain to search (grid spaces) |
References tran(), and withinExt().
bool Domain::withinExt | ( | Point & | pt, |
int | ext | ||
) |
Determines whether point is within extended domain
pt | Point to locate. |
ext | How much beyond the edge of domain to search (grid spaces) |
References WXP::DomainVal::dx, WXP::DomainVal::dy, WXP::Const::MISS, WXP::DomainVal::proj, WXP::Point::x, WXP::Rect::xmax, WXP::Rect::xmin, WXP::Point::y, WXP::Rect::ymax, and WXP::Rect::ymin.
Referenced by WXP::CityHash::setup(), and withinExt().
Wraps line around the edge of a projection. It will adjust either point to draw through projection edge. It returns what correction has been done.
pt1 | First point |
pt2 | Second point |
References earth_rad, LAMB, LATLON, MERC, MOLL, offset(), OFFSET_LL, OFFSET_MERC, WXP::Const::PI, WXP::DomainVal::proj, WXP::Point::x, and WXP::Point::y.
Referenced by WXP::Plot::drawFill(), WXP::Plot::drawLine(), WXP::Plot::drawLine(), and WXP::Plot::drawSpline().
int Domain::wrapLine | ( | Points & | pts | ) |
Wraps line around the edge of a projection. It will adjust either point to draw through projection edge. It returns what correction has been done.
pts | Set of points in line |
References earth_rad, WXP::Points::getNum(), WXP::Points::getX(), WXP::Points::getY(), LAMB, LATLON, MERC, MOLL, WXP::Points::offset(), offset(), OFFSET_LL, OFFSET_MERC, WXP::Const::PI, and WXP::DomainVal::proj.
int Domain::zoom | ( | Point & | pt, |
float | zfac | ||
) |
Zooms a domain (resets size)
pt | New centerpoint |
zfac | Zoom factor (>1=zoom in, <1=zoom out) |
References WXP::DomainVal::clat, WXP::DomainVal::clon, WXP::DomainVal::dx, WXP::DomainVal::dy, WXP::EarthPoint::lat, WXP::EarthPoint::lon, setLimits(), and tran().
Referenced by WXP::Figure::callback().
|
static |
Albers equal area
Referenced by getProj(), print(), setParam(), tran(), and tran().
|
static |
|
static |
Major axis earth radius
Referenced by init(), setParam(), tran(), and tran().
|
static |
|
static |
Mean earth radius
Referenced by WXP::AreaFile::calcDomain(), offsetLine(), offsetLine(), WXP::GridBox::set(), setParam(), tran(), tran(), wrapLine(), and wrapLine().
|
static |
Emagram thermodynamic diagram
Referenced by getProj(), print(), toString(), tran(), and tran().
|
static |
Gnomic
Referenced by getProj(), print(), and toString().
|
static |
Lambert conformal
Referenced by adjustDir(), WXP::AreaFile::calcDomain(), getMapFactor(), getProj(), offsetLine(), offsetLine(), print(), WXP::GribFile::readGDB(), WXP::GribFile::readGDS(), WXP::NowradFile::readHeader(), WXP::GiniFile::readHeader(), WXP::SatCdfFile::readHeader(), WXP::SatUniFile::readHeader(), WXP::ImgWxpFile::readHeader(), WXP::GribFile::setDomain(), setParam(), toString(), tran(), tran(), unadjustDir(), wrapLine(), wrapLine(), and WXP::ImgWxpFile::write().
|
static |
Lambert azithumal
Referenced by getProj(), print(), toString(), tran(), and tran().
|
static |
Latitude longitude
Referenced by adjust(), WXP::AreaFile::calcDomain(), WXP::MapPlot::drawLatLon(), WXP::Plot::drawLine(), WXP::Plot::drawSpline(), getProj(), offsetLine(), offsetLine(), print(), WXP::TiffFile::read(), WXP::GribFile::readGDB(), WXP::GribFile::readGDS(), WXP::KavradFile::readHeader(), WXP::NowradFile::readHeader(), WXP::SatCdfFile::readHeader(), WXP::ImgWxpFile::readHeader(), WXP::GridBox::set(), WXP::GribFile::setDomain(), toString(), tran(), tran(), tran(), wrapLine(), wrapLine(), and WXP::ImgWxpFile::write().
|
static |
Mercator
Referenced by adjust(), WXP::AreaFile::calcDomain(), WXP::MapPlot::drawLatLon(), WXP::Plot::drawLine(), WXP::Plot::drawSpline(), getMapFactor(), getProj(), offsetLine(), offsetLine(), print(), WXP::TiffFile::read(), WXP::GribFile::readGDB(), WXP::GribFile::readGDS(), WXP::GiniFile::readHeader(), WXP::SatCdfFile::readHeader(), WXP::ImgWxpFile::readHeader(), WXP::GridBox::set(), toString(), tran(), tran(), wrapLine(), wrapLine(), and WXP::ImgWxpFile::write().
|
static |
Molleweide
Referenced by WXP::AreaFile::calcDomain(), WXP::MapPlot::drawLatLon(), getProj(), offsetLine(), offsetLine(), print(), WXP::GridBox::set(), toString(), tran(), tran(), wrapLine(), and wrapLine().
|
static |
Projection limit for Lat/Lon
Referenced by offsetLine(), offsetLine(), WXP::GridBox::set(), wrapLine(), and wrapLine().
|
static |
Projection limit for Mercator
Referenced by adjust(), offsetLine(), offsetLine(), WXP::GridBox::set(), wrapLine(), and wrapLine().
|
static |
Orthographic
Referenced by getProj(), print(), toString(), tran(), and tran().
|
static |
Pixel space
Referenced by WXP::NidsPlot::drawData(), getProj(), isCoord(), print(), WXP::SatUniFile::readHeader(), toString(), tran(), and tran().
|
static |
|
static |
Polar stereographic
Referenced by adjustDir(), WXP::AreaFile::calcDomain(), WXP::DomainTool::decode(), direct(), WXP::MapPlot::drawLatLon(), WXP::MdrPlot::getDomain(), WXP::NidsPlot::getDomain(), WXP::RcmPlot::getDomain(), getMapFactor(), getProj(), isMap(), print(), WXP::GribFile::readGDB(), WXP::GribFile::readGDS(), WXP::GiniFile::readHeader(), WXP::ImgWxpFile::readHeader(), setParam(), toString(), tran(), tran(), unadjustDir(), and WXP::ImgWxpFile::write().
|
static |
Radar Radial
Referenced by getMapFactor(), getProj(), print(), setParam(), tran(), tran(), tran(), and tran().
|
static |
|
static |
Satellite
Referenced by adjustDir(), WXP::AreaFile::calcDomain(), WXP::MapPlot::drawLatLon(), getProj(), isMap(), print(), WXP::SatCdfFile::readHeader(), WXP::SatUniFile::readHeader(), WXP::ImgWxpFile::readHeader(), WXP::LritFile::readHeader(), setParam(), toString(), tran(), tran(), and WXP::ImgWxpFile::write().
|
static |
Specifies size of grid/image only
Referenced by WXP::DomainTool::decode(), and getProj().
|
static |
SkewT thermodynamic diagram
Referenced by WXP::DomainTool::decode(), getProj(), isTherm(), print(), toString(), tran(), and tran().
|
static |
Stuve thermodynamic diagram
Referenced by getProj(), print(), toString(), tran(), and tran().
|
static |
Tephigram thermodynamic diagram
Referenced by getProj(), print(), toString(), tran(), and tran().
|
static |
X-logP Cartesian
Referenced by WXP::Plot::callback(), WXP::XSectionPlot::getDomain(), getProj(), print(), toString(), tran(), and tran().
|
static |
|
static |
XY Cartesian
Referenced by WXP::MapPlot::draw(), getProj(), print(), set(), toString(), tran(), and tran().
|
static |
XZ Cartesian
Referenced by print(), and toString().
|
static |
Specifies zoom parameters
Referenced by WXP::DomainTool::decode(), getProj(), print(), and toString().