A class to represent meteo stations with attributes like longitude, latitude, etc.
#include <StationData.h>
Public Member Functions | |
| StationData (void) | |
| The default constructor initializing every double attribute to nodata and strings to "". More... | |
| StationData (const Coords &i_position, const std::string &i_id="", const std::string &i_name="") | |
| A constructor that takes three to six arguments. More... | |
| std::string | getStationID () const |
| std::string | getStationName () const |
| Coords | getPosition () const |
| std::string | getHash () const |
| double | getAltitude () const |
| double | getSlopeAngle () const |
| Get local slope angle. More... | |
| double | getAzimuth () const |
| Get local slope azimuth. More... | |
| void | setStationData (const Coords &i_position, const std::string &i_id="", const std::string &i_name="") |
| General setter function. More... | |
| void | setSlope (const double &in_slope_angle, const double &in_azimuth) |
| Slope information setter. More... | |
| const std::string | toString () const |
| bool | operator== (const StationData &) const |
| Equality operator check all parameters but the station name. More... | |
| bool | operator!= (const StationData &) const |
| Operator that tests for inequality. More... | |
| void | merge (const StationData &sd2) |
| Simple merge strategy. If some fields of the current object are empty, they will be filled by the macthing field from the provided argument. More... | |
Static Public Member Functions | |
| static StationData | merge (StationData sd1, const StationData &sd2) |
| Simple merge strategy. If some fields of the first argument are empty, they will be filled by the matching field from the second argument. More... | |
Public Attributes | |
| Coords | position |
| std::string | stationID |
| ID of the Station, typically a short string. More... | |
| std::string | stationName |
| Name of the Station, detailled description. More... | |
Friends | |
| std::iostream & | operator<< (std::iostream &os, const StationData &station) |
| std::iostream & | operator>> (std::iostream &is, StationData &station) |
| mio::StationData::StationData | ( | void | ) |
The default constructor initializing every double attribute to nodata and strings to "".
| mio::StationData::StationData | ( | const Coords & | i_position, |
| const std::string & | i_id = "", |
||
| const std::string & | i_name = "" |
||
| ) |
A constructor that takes three to six arguments.
| i_position | Position of the station |
| i_id | Station's id (short identification) |
| i_name | Full name of the station (default "") |
| double mio::StationData::getAltitude | ( | ) | const |
| double mio::StationData::getAzimuth | ( | ) | const |
Get local slope azimuth.
| std::string mio::StationData::getHash | ( | ) | const |
| Coords mio::StationData::getPosition | ( | ) | const |
| double mio::StationData::getSlopeAngle | ( | ) | const |
Get local slope angle.
| std::string mio::StationData::getStationID | ( | ) | const |
| std::string mio::StationData::getStationName | ( | ) | const |
|
static |
Simple merge strategy. If some fields of the first argument are empty, they will be filled by the matching field from the second argument.
| sd1 | first StationData to merge, highest priority |
| sd2 | second StationData to merge, lowest priority |
| void mio::StationData::merge | ( | const StationData & | sd2 | ) |
Simple merge strategy. If some fields of the current object are empty, they will be filled by the macthing field from the provided argument.
| sd2 | extra StationData to merge, lowest priority |
| bool mio::StationData::operator!= | ( | const StationData & | in | ) | const |
Operator that tests for inequality.
| bool mio::StationData::operator== | ( | const StationData & | in | ) | const |
Equality operator check all parameters but the station name.
| void mio::StationData::setSlope | ( | const double & | in_slope_angle, |
| const double & | in_azimuth | ||
| ) |
Slope information setter.
| in_slope_angle | angle of the local slope (in degrees, between 0 and 90 degrees) |
| in_azimuth | azimuth of the local slope expressed as a bearing (0 is North, in degrees, clockwise) |
| void mio::StationData::setStationData | ( | const Coords & | i_position, |
| const std::string & | i_id = "", |
||
| const std::string & | i_name = "" |
||
| ) |
General setter function.
| i_position | Position of the station |
| i_id | Station's id (short identification) |
| i_name | Name of the station (default "") |
| const std::string mio::StationData::toString | ( | ) | const |
|
friend |
|
friend |
| Coords mio::StationData::position |
| std::string mio::StationData::stationID |
ID of the Station, typically a short string.
| std::string mio::StationData::stationName |
Name of the Station, detailled description.