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... | |
| static bool | unique (std::vector< StationData > &vecStation, const bool &position_only=false) |
| Remove duplicate stations from a vector. More... | |
Public Attributes | |
| Coords | position |
| std::string | stationID |
| ID of the Station, typically a short string. More... | |
| std::string | stationName |
| Name of the Station, detailed description. More... | |
| std::map< std::string, std::string > | extra |
| Additional metadata, such as sensor types, etc. A better solution will be implemented at some point, so it WILL break. More... | |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const StationData &station) |
| std::istream & | operator>> (std::istream &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 "") |
|
inline |
|
inline |
Get local slope azimuth.
|
inline |
|
inline |
|
inline |
Get local slope angle.
|
inline |
|
inline |
| 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.
| [in] | sd2 | extra StationData to merge, lowest priority |
|
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 | |
| [in] | sd2 | second 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 |
|
static |
Remove duplicate stations from a vector.
| vecStation | vector to purge from duplicate entries | |
| [in] | position_only | only consider the station location as criteria for equality (default: false) |
|
friend |
|
friend |
| std::map<std::string, std::string> mio::StationData::extra |
Additional metadata, such as sensor types, etc. A better solution will be implemented at some point, so it WILL break.
| 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, detailed description.