WXP C++ Library Version 6.74.9
|
This class plots a set of maps. More...
#include "../include/MapPlot.h"
Public Member Functions | |
MapPlot () | |
MapPlot (const char *param) | |
~MapPlot () | |
int | init () |
int | getDomain (Domain &domain) |
int | setMapFiles (const char *str) |
int | setFile () |
int | setInput (const char *str) |
int | setNameConv (const char *name) |
int | setFilename () |
int | setFilename (const char *name) |
int | setFilename (Date &date) |
int | setFilename (Date &date, const char *param) |
int | setForeTime (const char *fore) |
int | getDate (Date &date) |
int | getInitDate (Date &date) |
int | getDateOffset () |
int | getLoopType () |
int | getNumFrames () |
int | setFillCont (bool v) |
int | setColorTable (const char *str) |
int | setColor (const char *name) |
int | setColorLatLon (const char *name) |
int | setColorLine (const char *str) |
int | setParam (const char *str) |
int | getSync () |
int | drawSegment (Plot &plot, Points &pts) |
int | draw (Plot &plot, const char *file) |
int | drawLatLon (Plot &plot, float dlat, float dlon) |
int | draw (Plot &plot) |
int | print () |
virtual int | init ()=0 |
virtual int | getDomain (Domain &domain)=0 |
virtual int | setFile ()=0 |
virtual int | setInput (const char *type)=0 |
virtual int | setNameConv (const char *name)=0 |
virtual int | setFilename ()=0 |
virtual int | setFilename (const char *file)=0 |
virtual int | setFilename (Date &date)=0 |
virtual int | setFilename (Date &date, const char *param)=0 |
virtual int | setForeTime (const char *fore)=0 |
virtual int | setParam (const char *str)=0 |
virtual int | getDate (Date &date)=0 |
virtual int | getLoopType ()=0 |
virtual int | getInitDate (Date &date)=0 |
virtual int | getDateOffset ()=0 |
virtual int | getNumFrames ()=0 |
virtual int | getSync ()=0 |
virtual int | draw (Plot &plot)=0 |
virtual int | print ()=0 |
Static Public Attributes | |
static const int | UNDER = 1 |
static const int | OVER = 2 |
Static Public Attributes inherited from WXP::Drawing | |
static const int | LOOP_NONE = 0 |
static const int | LOOP_DATE = 1 |
static const int | LOOP_FORE = 2 |
This class plots a set of maps.
MapPlot::MapPlot | ( | ) |
Constructor
References init().
MapPlot::MapPlot | ( | const char * | param | ) |
MapPlot::~MapPlot | ( | ) |
Destructor
|
virtual |
Draws the maps
plot | The plot object |
Implements WXP::Drawing.
References WXP::FileTool::addPath(), WXP::StrLib::copy(), drawLatLon(), WXP::String::get(), WXP::Strings::getChar(), WXP::Wxp::getDatabasePath(), WXP::Strings::getNum(), WXP::Strings::getString(), WXP::Strings::iequal(), WXP::File::isOpen(), WXP::Const::MISS, WXP::Wxp::outDebug(), WXP::Wxp::outWarning(), WXP::File::scanf(), WXP::Plot::setLine(), WXP::Plot::setText(), and WXP::String::valid().
int MapPlot::draw | ( | Plot & | plot, |
const char * | file | ||
) |
Draws a map from a map database file.
plot | Plot class to draw to |
file | Map database file to plot |
References WXP::Points::add(), WXP::Points::clear(), drawSegment(), WXP::Plot::drawText(), WXP::Points::getNum(), WXP::MapFileHeader::index, WXP::Domain::isMap(), WXP::MapFile::isOpen(), WXP::EarthPoint::lat, WXP::EarthPoint::lon, WXP::MapFileHeader::maxlat, WXP::MapFileHeader::maxlon, WXP::MapFileHeader::minlat, WXP::MapFileHeader::minlon, WXP::Const::MISS, WXP::MapFileHeader::num, WXP::MapFile::open(), WXP::Wxp::outDebug(), WXP::MapFile::readData(), WXP::MapFile::readHeader(), WXP::EarthPoint::set(), WXP::Plot::setLineColor(), WXP::Plot::setTextColor(), WXP::Point::x, and WXP::Domain::XY.
Referenced by WXP::FrontPlot::draw(), WXP::GridPlot::draw(), WXP::HurPlot::draw(), WXP::Lev2Plot::draw(), WXP::LightPlot::draw(), WXP::MosPlot::draw(), WXP::NidsPlot::draw(), WXP::RawPlot::draw(), WXP::RedbookPlot::draw(), WXP::SatPlot::draw(), WXP::SfcPlot::draw(), WXP::UpaPlot::draw(), WXP::WarnPlot::draw(), and WXP::WatchPlot::draw().
int MapPlot::drawLatLon | ( | Plot & | plot, |
float | dlat, | ||
float | dlon | ||
) |
Draws a set of latitude/longitude lines
plot | Plot class to draw to |
dlat | Offset between each latitude line |
dlon | Offset between each longitude line |
References WXP::Points::add(), WXP::Points::clear(), WXP::Plot::drawLine(), WXP::Plot::drawText(), WXP::Points::getNum(), WXP::Domain::isMap(), WXP::Domain::LATLON, WXP::Domain::MERC, WXP::Const::MISS, WXP::Domain::MOLL, WXP::Domain::PSTEREO, WXP::Domain::SAT, WXP::EarthPoint::set(), WXP::Point::x, WXP::Rect::xmax, WXP::Rect::xmin, WXP::Point::y, WXP::Rect::ymax, and WXP::Rect::ymin.
Referenced by draw().
Draws an individual map segment
plot | The plot object |
pts | The points to plot |
References WXP::Points::clear(), WXP::Plot::drawFill(), and WXP::Plot::drawLine().
Referenced by draw().
|
virtual |
|
virtual |
Returns the date offset (unused)
Implements WXP::Drawing.
|
virtual |
Gets the default domain
domain | The domain |
Implements WXP::Drawing.
References WXP::DomainTool::decode().
|
virtual |
Gets the initial date (unused)
date | The date |
Implements WXP::Drawing.
References WXP::Date::init().
|
virtual |
|
virtual |
Gets the number of frames (unused)
Implements WXP::Drawing.
|
inlinevirtual |
Returns whether object is time sync (unused)
Implements WXP::Drawing.
|
virtual |
Initializes the object
Implements WXP::Drawing.
References WXP::String::init(), WXP::Const::MISS, setColor(), setColorLatLon(), setColorTable(), and setParam().
|
virtual |
Prints the object parameters
Implements WXP::Drawing.
int MapPlot::setColor | ( | const char * | str | ) |
Sets the map color
str | The map color |
References WXP::String::set().
Referenced by init(), and setParam().
int MapPlot::setColorLatLon | ( | const char * | str | ) |
Sets the lat/lon line color
str | The color |
References WXP::String::set().
Referenced by init(), and setParam().
int MapPlot::setColorLine | ( | const char * | str | ) |
Sets the line color in filled polygons
str | The color |
References WXP::String::set().
Referenced by setParam().
int MapPlot::setColorTable | ( | const char * | str | ) |
Sets the color table
str | The color table file |
References WXP::String::set().
Referenced by init(), and setParam().
|
virtual |
Sets the file name (unused)
Implements WXP::Drawing.
|
virtual |
Sets the file name (unused)
Implements WXP::Drawing.
|
virtual |
Sets the file name (unused)
name | The file name |
Implements WXP::Drawing.
References setMapFiles().
|
virtual |
|
virtual |
|
inline |
Sets whether map object is to plot as fill overlay
Referenced by WXP::GridPlot::draw(), WXP::MosPlot::draw(), WXP::RawPlot::draw(), WXP::SfcPlot::draw(), and WXP::UpaPlot::draw().
|
inlinevirtual |
Sets forecast time (ignored)
Implements WXP::Drawing.
|
virtual |
int MapPlot::setMapFiles | ( | const char * | str | ) |
Sets the list of map files to use
str | The map list |
References WXP::String::set().
Referenced by setFilename(), and setParam().
|
virtual |
|
virtual |
Sets the object parameters
str | The parameters ct=file - Color table file co=color - Map Color coll=color - Lat/lon line Color coln=color - Color of lines in fill polygons mf=maps - map list map_in - disables map range check, all segment in domain fill - fill map segments fill_cont - map coloring for fill overlay (default black) fc - map coloring for fill overlay index - plot segment index and color segments lalo=la:lo - plot lat/lon lines: la=latitude offset, lo=longitude offset default - sets up object as default map under - sets up object as an underlay map over - sets up object as an overlay map |
Implements WXP::Drawing.
References WXP::Strings::equal(), WXP::Strings::getNum(), WXP::Strings::getString(), WXP::Strings::getStringAfter(), setColor(), setColorLatLon(), setColorLine(), setColorTable(), and setMapFiles().
Referenced by WXP::GridPlot::draw(), WXP::MosPlot::draw(), WXP::RawPlot::draw(), WXP::SfcPlot::draw(), WXP::UpaPlot::draw(), init(), and MapPlot().