MeteoIODoc  MeteoIODoc-2.6.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mio::StationData Class Reference

Detailed Description

A class to represent meteo stations with attributes like longitude, latitude, etc.

Author
Thomas Egger
Date
2008-11-29

#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)
 

Constructor & Destructor Documentation

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.

Parameters
i_positionPosition of the station
i_idStation's id (short identification)
i_nameFull name of the station (default "")

Member Function Documentation

double mio::StationData::getAltitude ( ) const
double mio::StationData::getAzimuth ( ) const

Get local slope azimuth.

Returns
azimuth of the local slope expressed as a bearing (0 is North, in degrees, clockwise)
std::string mio::StationData::getHash ( ) const
Coords mio::StationData::getPosition ( ) const
double mio::StationData::getSlopeAngle ( ) const

Get local slope angle.

Returns
angle of the local slope (in degrees, between 0 and 90 degrees)
std::string mio::StationData::getStationID ( ) const
std::string mio::StationData::getStationName ( ) const
StationData mio::StationData::merge ( StationData  sd1,
const StationData sd2 
)
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.

Parameters
sd1first StationData to merge, highest priority
sd2second StationData to merge, lowest priority
Returns
new StationData object
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.

Parameters
sd2extra 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.

Returns
true or false
void mio::StationData::setSlope ( const double &  in_slope_angle,
const double &  in_azimuth 
)

Slope information setter.

Parameters
in_slope_angleangle of the local slope (in degrees, between 0 and 90 degrees)
in_azimuthazimuth 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.

Parameters
i_positionPosition of the station
i_idStation's id (short identification)
i_nameName of the station (default "")
const std::string mio::StationData::toString ( ) const

Friends And Related Function Documentation

std::iostream& operator<< ( std::iostream &  os,
const StationData station 
)
friend
std::iostream& operator>> ( std::iostream &  is,
StationData station 
)
friend

Member Data Documentation

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.


The documentation for this class was generated from the following files: