This class stores and manipulates domain data. More...
#include "../include/Domain.h"
Public Types | |
| enum | { UL, UR, LL, LR, CENTER } |
Public Member Functions | |
| Domain () | |
| 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 (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 &pt) |
| float | unadjustDir (float dir, Point &pt) |
| 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 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 const float | earth_rad = 63.7122 |
| static const float | earth_maj = 63.78137 |
| static const float | 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 | SAT = DomainVal::SAT |
| 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 const float | OFFSET_LL = 360 |
| static const float | OFFSET_MERC = 360*63.7122*.017453293 |
This class stores and manipulates domain data.
| anonymous enum |
| Domain::Domain | ( | ) |
Constructor. Initializes parameters.
References init().
| 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().
| 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().
| 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 adjustDir(), WXP::GridMath::adjustUV(), WXP::UpaRaw::compute(), WXP::SfcRaw::compute(), WXP::MosRaw::compute(), and WXP::Lev2Plot::draw().
| float Domain::calcEarthDist | ( | EarthPoint & | ept1, | |
| EarthPoint & | ept2 | |||
| ) | [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::UpaXSectPlot::draw(), and WXP::UpaXSectCont::draw().
Compares two domain specifications for full domain match.
| dom1 | First domain | |
| dom2 | Second domain |
Reimplemented from WXP::DomainVal.
Compares two domain specifications for projection match.
| dom1 | First domain | |
| dom2 | Second domain |
Referenced by 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::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.
Reimplemented from WXP::DomainVal.
References WXP::DomainVal::nx, and WXP::DomainVal::ny.
| float WXP::Domain::getCLat | ( | ) | [inline] |
| float WXP::Domain::getCLon | ( | ) | [inline] |
| float WXP::Domain::getDx | ( | ) | [inline] |
Returns grid spacing in X
References WXP::DomainVal::dx.
Referenced by WXP::Lev2Plot::draw(), WXP::Image::getDx(), WXP::Grid::getDx(), WXP::ImageMath::merge(), and WXP::ImgWxpFile::write().
| float WXP::Domain::getDy | ( | ) | [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, WXP::DomainVal::plat, WXP::DomainVal::proj, and PSTEREO.
| int WXP::Domain::getNx | ( | ) | [inline] |
Returns number of gridpoints in X
References WXP::DomainVal::nx.
Referenced by WXP::GridPiece::add(), WXP::ImagePlot::drawImage(), WXP::ImageMath::merge(), and WXP::ImgWxpFile::write().
| int WXP::Domain::getNy | ( | ) | [inline] |
Returns number of gridpoints in Y
References WXP::DomainVal::ny.
Referenced by WXP::GridPiece::add(), WXP::ImagePlot::drawImage(), WXP::ImageMath::merge(), and WXP::ImgWxpFile::write().
| float WXP::Domain::getParam | ( | int | i | ) | [inline] |
Returns projection parameters
References WXP::Const::MISS, and WXP::DomainVal::param.
Referenced by WXP::ImgWxpFile::write().
| float WXP::Domain::getPLat | ( | ) | [inline] |
Returns projection latitude
References WXP::DomainVal::plat.
Referenced by WXP::ImgWxpFile::write().
| float WXP::Domain::getPLon | ( | ) | [inline] |
Returns projection longitude
References WXP::DomainVal::plon.
Referenced by WXP::ImgWxpFile::write().
| int Domain::getProj | ( | const char * | proj | ) | [static] |
Returns the projection type given a descriptive string
| proj | Projection string |
References CAT, EMA, GNOM, WXP::StrLib::iequal(), LAMB, LAMBAZ, LATLON, MERC, WXP::Const::MISS, MOLL, ORTHO, PIXEL, POLAR, PSTEREO, RTEPH, SAT, SIZE, SKEWT, STUVE, TEPH, XLOGP, XP, XY, and ZOOM.
| int WXP::Domain::getProj | ( | ) | [inline] |
Returns projection type
References WXP::DomainVal::proj.
Referenced by WXP::UpaGrid::compute(), WXP::SfcGrid::compute(), WXP::RawGrid::compute(), WXP::MosGrid::compute(), WXP::ImagePlot::drawImage(), WXP::Plot::drawLine(), WXP::Plot::drawSpline(), WXP::Grid::getProj(), WXP::ImageMath::remap(), WXP::GridBox::set(), set(), and WXP::ImgWxpFile::write().
| float Domain::getVert | ( | ) |
Calculate the vertical distance of the domain
| int Domain::init | ( | ) |
Initializes domain parameters
Reimplemented from WXP::DomainVal.
References WXP::Const::MISS.
Referenced by Domain(), WXP::UpaXSectPlot::getDomain(), WXP::UpaXSectCont::getDomain(), WXP::RedbookPlot::getDomain(), WXP::Image::init(), WXP::Grid::init(), WXP::NowradFile::readHeader(), WXP::KavradFile::readHeader(), and set().
| static bool WXP::Domain::isCoord | ( | int | a | ) | [inline, static] |
| int WXP::Domain::isCoord | ( | ) | [inline] |
Is the projection a coordinate plot
References isCoord(), and WXP::DomainVal::proj.
Referenced by WXP::Plot::callback(), and isCoord().
| static bool WXP::Domain::isMap | ( | int | a | ) | [inline, static] |
| int WXP::Domain::isMap | ( | ) | [inline] |
Is the projection a map
References isMap(), and WXP::DomainVal::proj.
Referenced by WXP::MapPlot::draw(), WXP::MapPlot::drawLatLon(), isMap(), setLimits(), tran(), and zoom().
| static bool WXP::Domain::isPolar | ( | int | a | ) | [inline, static] |
Is the projection a polar plot
References POLAR.
| int WXP::Domain::isPolar | ( | ) | [inline] |
Is the projection a polar plot
References isPolar(), and WXP::DomainVal::proj.
Referenced by WXP::Plot::callback(), and isPolar().
| int WXP::Domain::isProj | ( | int | p | ) | [inline] |
Returns if projection matches p
References WXP::DomainVal::proj.
| bool WXP::Domain::isSet | ( | ) | [inline] |
Returns true if domain is set to something
References WXP::Const::MISS, and WXP::DomainVal::proj.
Referenced by WXP::UpaPlot::draw(), WXP::SfcPlot::draw(), WXP::RedbookPlot::draw(), WXP::RawPlot::draw(), WXP::MosPlot::draw(), WXP::RedbookPlot::getDomain(), and WXP::GridMath::remap().
| static bool WXP::Domain::isTherm | ( | int | a | ) | [inline, static] |
| int WXP::Domain::isTherm | ( | ) | [inline] |
Is the projection a thermo diagram
References isTherm(), and WXP::DomainVal::proj.
Referenced by WXP::Plot::callback(), isTherm(), pan(), and zoom().
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(), and wrapLine().
| int Domain::offsetLatLon | ( | EarthPoint & | ept, | |
| float | dir, | |||
| float | rad, | |||
| EarthPoint & | opt | |||
| ) | [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(), and offset().
| int Domain::offsetLine | ( | Points & | pts, | |
| int | flag | |||
| ) |
Adjusts the date according to new hour
| rhour | New hour |
References WXP::Points::getNum(), LAMB, LATLON, MERC, MOLL, WXP::Points::offset(), offset(), OFFSET_LL, OFFSET_MERC, WXP::Const::PI, and WXP::DomainVal::proj.
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 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(), and WXP::Plot::drawSpline().
| 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::Convert::CtoK(), WXP::DomainVal::dx, WXP::DomainVal::dy, isTherm(), WXP::EarthPoint::lat, WXP::EarthPoint::lon, WXP::Calc::potTemp(), WXP::DomainVal::proj, WXP::Point::set(), setLimits(), TEPH, tran(), WXP::Point::x, and WXP::Point::y.
Referenced by WXP::Figure::callback().
| int Domain::print | ( | ) |
Prints domain parameters to standard output.
Reimplemented from WXP::DomainVal.
References CAT, WXP::DomainVal::clat, WXP::DomainVal::clon, WXP::DomainVal::dx, WXP::DomainVal::dy, 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::Figure::callback(), WXP::RedbookPlot::draw(), WXP::NidsPlot::getDomain(), WXP::SfcPlot::print(), WXP::Image::print(), and WXP::Grid::print().
| int Domain::printLimits | ( | ) |
Prints the domain limits in projection coordinates
| 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::UpaGrid::compute(), WXP::SfcGrid::compute(), WXP::RawGrid::compute(), and WXP::MosGrid::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 | ( | 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 | ( | 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, 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::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::AreaFile::calcDomain(), WXP::ObjectAnal::compute(), WXP::DomainTool::decode(), WXP::NidsPlot::drawData(), WXP::ThermPlot::getDomain(), WXP::RcmPlot::getDomain(), WXP::NidsPlot::getDomain(), WXP::MiscPlot::getDomain(), WXP::MeteoPlot::getDomain(), WXP::MetaPlot::getDomain(), WXP::MdrPlot::getDomain(), WXP::HodoPlot::getDomain(), WXP::TiffFile::read(), WXP::GribFile::readGDB(), WXP::GribFile::readGDS(), WXP::NowradFile::readHeader(), WXP::KavradFile::readHeader(), WXP::GiniFile::readHeader(), WXP::ImagePiece::set(), WXP::Image::set(), WXP::Grid::setDomain(), WXP::NidsImage::setImage(), and WXP::Grid::setSize().
| int Domain::setLimits | ( | ) |
Sets the domain limits.
References CAT, WXP::DomainVal::clat, WXP::DomainVal::clon, WXP::DomainVal::dx, WXP::DomainVal::dy, EMA, isMap(), WXP::Const::MISS, WXP::DomainVal::nx, WXP::DomainVal::ny, PIXEL, POLAR, WXP::DomainVal::proj, RTEPH, WXP::Point::set(), WXP::EarthPoint::set(), SKEWT, STUVE, TEPH, tran(), tranCenter(), WXP::Point::x, XP, XY, and WXP::Point::y.
Referenced by pan(), setParam(), and zoom().
| int Domain::setParam | ( | ) |
Sets the internal domain values.
References WXP::DomainVal::clat, WXP::DomainVal::clon, LAMB, WXP::Const::MISS, WXP::DomainVal::param, WXP::DomainVal::plat, WXP::DomainVal::plon, WXP::DomainVal::proj, PSTEREO, SAT, and setLimits().
Referenced by set().
| 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, 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::PngFile::write(), WXP::ImgWxpFile::write(), and WXP::GifFile::write().
| 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().
| 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().
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, WXP::Point::x, and WXP::Point::y.
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::Point::x, and WXP::Point::y.
| 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 CAT, WXP::Convert::CtoK(), WXP::Const::DRC, WXP::DomainVal::dx, EMA, isMap(), LAMB, LAMBAZ, WXP::EarthPoint::lat, LATLON, WXP::EarthPoint::lon, MERC, WXP::Const::MISS, MOLL, ORTHO, WXP::DomainVal::param, WXP::Const::PI, PIXEL, WXP::DomainVal::plat, WXP::DomainVal::plon, POLAR, WXP::DomainVal::proj, PSTEREO, WXP::Const::RDC, RTEPH, SAT, WXP::Angle::set(), SKEWT, STUVE, TEPH, WXP::Point::x, XLOGP, XP, XY, and WXP::Point::y.
| 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 CAT, WXP::Convert::CtoK(), WXP::Const::DRC, EMA, isMap(), LAMB, LAMBAZ, WXP::EarthPoint::lat, LATLON, WXP::EarthPoint::lon, MERC, WXP::Const::MISS, MOLL, ORTHO, WXP::DomainVal::param, WXP::Const::PI, PIXEL, WXP::DomainVal::plat, WXP::DomainVal::plon, POLAR, WXP::Calc::potTemp(), WXP::DomainVal::proj, PSTEREO, RTEPH, SAT, WXP::Angle::set(), SKEWT, STUVE, TEPH, WXP::Point::x, XLOGP, XP, XY, and WXP::Point::y.
Referenced by adjustDir(), WXP::GridMath::adjustUV(), WXP::AreaFile::calcDomain(), WXP::Plot::callback(), WXP::ObjectAnal::compute(), WXP::RedbookPlot::draw(), WXP::Lev2Plot::draw(), WXP::Plot::drawLine(), WXP::Grid::getValue(), offset(), pan(), WXP::TiffFile::read(), WXP::GribFile::readGDB(), WXP::GribFile::readGDS(), WXP::GiniFile::readHeader(), WXP::ImagePiece::set(), set(), WXP::CityHash::set(), WXP::NidsImage::setImage(), setLimits(), WXP::Image::tran(), WXP::Grid::tran(), tran(), tranCenter(), translate(), where(), within(), withinExt(), and zoom().
| 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().
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::Grid::tran().
| 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.
| 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, and WXP::Point::y.
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, and WXP::Point::y.
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, and WXP::Point::y.
Referenced by WXP::CityHash::set(), and withinExt().
| 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 WXP::Points::getNum(), LAMB, LATLON, MERC, MOLL, WXP::Points::offset(), offset(), OFFSET_LL, OFFSET_MERC, WXP::Const::PI, and WXP::DomainVal::proj.
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 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(), and WXP::Plot::drawSpline().
| 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::Convert::CtoK(), WXP::DomainVal::dx, WXP::DomainVal::dy, isMap(), isTherm(), WXP::EarthPoint::lat, WXP::EarthPoint::lon, WXP::DomainVal::nx, WXP::DomainVal::ny, PIXEL, POLAR, WXP::Calc::potTemp(), WXP::DomainVal::proj, WXP::Point::set(), setLimits(), TEPH, tran(), WXP::Point::x, and WXP::Point::y.
Referenced by WXP::Figure::callback().
const int WXP::Domain::CAT = DomainVal::CAT [static] |
Category plot
Reimplemented from WXP::DomainVal.
Referenced by getProj(), isCoord(), print(), WXP::DomainTool::proj(), setLimits(), toString(), and tran().
const int WXP::Domain::EMA = DomainVal::EMA [static] |
Emagram thermodynamic diagram
Reimplemented from WXP::DomainVal.
Referenced by getProj(), print(), WXP::DomainTool::proj(), setLimits(), toString(), and tran().
const int WXP::Domain::GNOM = DomainVal::GNOM [static] |
Gnomic
Reimplemented from WXP::DomainVal.
Referenced by getProj(), print(), WXP::DomainTool::proj(), and toString().
const int WXP::Domain::LAMB = DomainVal::LAMB [static] |
Lambert conformal
Reimplemented from WXP::DomainVal.
Referenced by adjustDir(), WXP::AreaFile::calcDomain(), getMapFactor(), getProj(), offsetLine(), print(), WXP::DomainTool::proj(), WXP::GribFile::readGDB(), WXP::GribFile::readGDS(), WXP::SatUniFile::readHeader(), WXP::NowradFile::readHeader(), WXP::ImgWxpFile::readHeader(), WXP::GiniFile::readHeader(), WXP::GribFile::setDomain(), setParam(), toString(), tran(), unadjustDir(), wrapLine(), and WXP::ImgWxpFile::write().
const int WXP::Domain::LAMBAZ = DomainVal::LAMBAZ [static] |
Lambert azithumal
Reimplemented from WXP::DomainVal.
Referenced by getProj(), print(), WXP::DomainTool::proj(), toString(), and tran().
const int WXP::Domain::LATLON = DomainVal::LATLON [static] |
Latitude longitude
Reimplemented from WXP::DomainVal.
Referenced by adjust(), WXP::AreaFile::calcDomain(), WXP::MapPlot::drawLatLon(), WXP::Plot::drawLine(), WXP::Plot::drawSpline(), getProj(), offsetLine(), print(), WXP::DomainTool::proj(), WXP::TiffFile::read(), WXP::GribFile::readGDB(), WXP::GribFile::readGDS(), WXP::NowradFile::readHeader(), WXP::KavradFile::readHeader(), WXP::ImgWxpFile::readHeader(), WXP::GridBox::set(), WXP::GribFile::setDomain(), toString(), tran(), wrapLine(), and WXP::ImgWxpFile::write().
const int WXP::Domain::MERC = DomainVal::MERC [static] |
Mercator
Reimplemented from WXP::DomainVal.
Referenced by adjust(), WXP::AreaFile::calcDomain(), WXP::MapPlot::drawLatLon(), WXP::Plot::drawLine(), WXP::Plot::drawSpline(), getProj(), offsetLine(), print(), WXP::DomainTool::proj(), WXP::TiffFile::read(), WXP::GribFile::readGDB(), WXP::GribFile::readGDS(), WXP::ImgWxpFile::readHeader(), WXP::GiniFile::readHeader(), WXP::GridBox::set(), toString(), tran(), wrapLine(), and WXP::ImgWxpFile::write().
const int WXP::Domain::MOLL = DomainVal::MOLL [static] |
Molleweide
Reimplemented from WXP::DomainVal.
Referenced by WXP::AreaFile::calcDomain(), WXP::MapPlot::drawLatLon(), getProj(), offsetLine(), print(), WXP::DomainTool::proj(), WXP::GridBox::set(), toString(), tran(), and wrapLine().
const float Domain::OFFSET_LL = 360 [static] |
Projection limit for Lat/Lon
Referenced by offsetLine(), WXP::GridBox::set(), and wrapLine().
const float Domain::OFFSET_MERC = 360*63.7122*.017453293 [static] |
Projection limit for Mercator
Referenced by adjust(), offsetLine(), WXP::GridBox::set(), and wrapLine().
const int WXP::Domain::ORTHO = DomainVal::ORTHO [static] |
Orthographic
Reimplemented from WXP::DomainVal.
Referenced by getProj(), print(), WXP::DomainTool::proj(), toString(), and tran().
const int WXP::Domain::PIXEL = DomainVal::PIXEL [static] |
Pixel space
Reimplemented from WXP::DomainVal.
Referenced by WXP::NidsPlot::drawData(), getProj(), isCoord(), print(), WXP::DomainTool::proj(), WXP::SatUniFile::readHeader(), setLimits(), toString(), tran(), and zoom().
const int WXP::Domain::POLAR = DomainVal::POLAR [static] |
Polar coordinate
Reimplemented from WXP::DomainVal.
Referenced by getProj(), isPolar(), print(), WXP::DomainTool::proj(), setLimits(), toString(), tran(), and zoom().
const int WXP::Domain::PSTEREO = DomainVal::PSTEREO [static] |
Polar stereographic
Reimplemented from WXP::DomainVal.
Referenced by adjustDir(), WXP::AreaFile::calcDomain(), WXP::DomainTool::decode(), direct(), WXP::RcmPlot::getDomain(), WXP::NidsPlot::getDomain(), WXP::MdrPlot::getDomain(), getMapFactor(), getProj(), isMap(), print(), WXP::DomainTool::proj(), WXP::GribFile::readGDB(), WXP::GribFile::readGDS(), WXP::ImgWxpFile::readHeader(), WXP::GiniFile::readHeader(), setParam(), toString(), tran(), unadjustDir(), and WXP::ImgWxpFile::write().
const int WXP::Domain::RTEPH = DomainVal::RTEPH [static] |
Rotated Tephigram thermodynamic diagram
Reimplemented from WXP::DomainVal.
Referenced by getProj(), isTherm(), print(), WXP::DomainTool::proj(), setLimits(), toString(), and tran().
const int WXP::Domain::SAT = DomainVal::SAT [static] |
Satellite
Reimplemented from WXP::DomainVal.
Referenced by adjustDir(), WXP::AreaFile::calcDomain(), WXP::MapPlot::drawLatLon(), getProj(), isMap(), print(), WXP::DomainTool::proj(), WXP::SatUniFile::readHeader(), WXP::ImgWxpFile::readHeader(), setParam(), toString(), tran(), and WXP::ImgWxpFile::write().
const int WXP::Domain::SIZE = DomainVal::SIZE [static] |
Specifies size of grid/image only
Reimplemented from WXP::DomainVal.
Referenced by WXP::DomainTool::decode(), getProj(), and WXP::DomainTool::proj().
const int WXP::Domain::SKEWT = DomainVal::SKEWT [static] |
SkewT thermodynamic diagram
Reimplemented from WXP::DomainVal.
Referenced by getProj(), isTherm(), print(), WXP::DomainTool::proj(), setLimits(), toString(), and tran().
const int WXP::Domain::STUVE = DomainVal::STUVE [static] |
Stuve thermodynamic diagram
Reimplemented from WXP::DomainVal.
Referenced by getProj(), print(), WXP::DomainTool::proj(), setLimits(), toString(), and tran().
const int WXP::Domain::TEPH = DomainVal::TEPH [static] |
Tephigram thermodynamic diagram
Reimplemented from WXP::DomainVal.
Referenced by getProj(), pan(), print(), WXP::DomainTool::proj(), setLimits(), toString(), tran(), and zoom().
const int WXP::Domain::XLOGP = DomainVal::XLOGP [static] |
X-logP Cartesian
Reimplemented from WXP::DomainVal.
Referenced by getProj(), print(), WXP::DomainTool::proj(), toString(), and tran().
const int WXP::Domain::XP = DomainVal::XP [static] |
X-Pres Cartesian
Reimplemented from WXP::DomainVal.
Referenced by getProj(), WXP::DomainTool::proj(), setLimits(), and tran().
const int WXP::Domain::XY = DomainVal::XY [static] |
XY Cartesian
Reimplemented from WXP::DomainVal.
Referenced by getProj(), print(), WXP::DomainTool::proj(), setLimits(), toString(), and tran().
const int WXP::Domain::XZ = DomainVal::XZ [static] |
const int WXP::Domain::ZOOM = DomainVal::ZOOM [static] |
Specifies zoom parameters
Reimplemented from WXP::DomainVal.
Referenced by WXP::DomainTool::decode(), getProj(), print(), WXP::DomainTool::proj(), and toString().
1.6.1