This class is a set of tools for working with city databases. More...
#include "../include/CityTool.h"
Static Public Member Functions | |
| static int | getFilename (const char *file, String &filename) |
| static int | search (const char *file, const char *id, CityData &data) |
| static int | locate (const char *file, const char *id, EarthPoint &ept) |
| static int | compareData (Strings &ids, CityData &data) |
| static int | toId (int wmo, char *id) |
| static int | toWmo (const char *id, int &wmo) |
This class is a set of tools for working with city databases.
Checks a string list to see if any IDs match current city data
| ids | String list of station identifiers | |
| data | Station data information to compare against |
References WXP::CityData::getId(), WXP::Strings::getLength(), WXP::CityData::getName(), WXP::Strings::getNum(), WXP::CityData::getWmo(), and WXP::Strings::iequal().
Referenced by WXP::CityPlot::draw().
| int CityTool::getFilename | ( | const char * | file, | |
| String & | filename | |||
| ) | [static] |
Generates the database filename, tacking on file_path location
| file | Filename to use |
| filename | String class to put output filename |
References WXP::FileTool::addPath(), WXP::Wxp::getDatabasePath(), and WXP::StrLib::iequal().
Referenced by search().
| int CityTool::locate | ( | const char * | file, | |
| const char * | id, | |||
| EarthPoint & | ept | |||
| ) | [static] |
Searches database for ID and returns location
| file | Database filename to use | |
| id | Station identifier to search for |
| ept | EarthPoint class with station latitude and longitude |
References WXP::CityData::getLat(), WXP::CityData::getLon(), WXP::EarthPoint::init(), WXP::EarthPoint::lat, WXP::EarthPoint::lon, and search().
Referenced by WXP::ThermPlot::draw(), and WXP::HodoPlot::draw().
| int CityTool::search | ( | const char * | file, | |
| const char * | id, | |||
| CityData & | data | |||
| ) | [static] |
Searches database for ID and returns data
| file | Database filename to use | |
| id | Station identifier to search for |
| data | CityData class with station information |
References WXP::String::get(), getFilename(), WXP::CityData::getId(), WXP::CityData::getName(), WXP::CityData::getWmo(), WXP::StrLib::iequal(), WXP::Wxp::outMessage(), and WXP::FileAttr::READ.
Referenced by WXP::ThermPlot::draw(), WXP::HodoPlot::draw(), WXP::RcmPlot::getDomain(), WXP::NidsPlot::getDomain(), WXP::MdrPlot::getDomain(), and locate().
1.6.1