WXP C++ Library Version 6.74.9
|
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 (const char *wmo, char *id) |
static int | toWmo (const char *id, char *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::StrLib::contains(), WXP::StrLib::copy(), WXP::Calc::earthDist(), WXP::CityData::getElev(), WXP::CityData::getId(), WXP::CityData::getLat(), WXP::Strings::getLength(), WXP::CityData::getLon(), WXP::CityData::getName(), WXP::Strings::getNum(), WXP::CityData::getPrior(), WXP::CityData::getRegion(), WXP::CityData::getState(), WXP::Strings::getString(), WXP::CityData::getWmo(), and WXP::Strings::iequal().
Referenced by WXP::CityPlot::draw(), and WXP::CityHash::setup().
|
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().
|
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::EarthPoint::elev, WXP::CityData::getElev(), WXP::CityData::getLat(), WXP::CityData::getLon(), WXP::EarthPoint::init(), WXP::EarthPoint::lat, WXP::EarthPoint::lon, and search().
Referenced by WXP::HodoPlot::draw(), and WXP::SoundPlot::draw().
|
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::CityFile::isOpen(), WXP::Wxp::outMessage(), WXP::CityFile::read(), WXP::FileAttr::READ, and WXP::CityFile::rewind().
Referenced by WXP::HodoPlot::draw(), WXP::SoundPlot::draw(), WXP::MdrPlot::getDomain(), WXP::NidsPlot::getDomain(), WXP::RcmPlot::getDomain(), and locate().
|
static |
Encodes a numeric WMO ID into a character station ID
wmo | WMO number |
id | Coded station ID (min 6 characters) |
Referenced by WXP::UpaRawinHash::put(), and WXP::UpaRawinHash::setup().
|
static |
Converts encoded station ID back to WMO number
id | Coded station ID |
wmo | WMO ID |
Referenced by WXP::CityHash::get().