OGS
Station.h
Go to the documentation of this file.
1
15#pragma once
16
17#include <memory>
18#include <string>
19
20#include "Point.h"
21#include "SensorData.h"
22
23namespace GeoLib
24{
36class Station : public Point
37{
38public:
48 explicit Station(double x = 0.0, double y = 0.0, double z = 0.0,
49 std::string name = "");
50
51 explicit Station(Point const* coords, std::string name = "");
52
57 Station(Station const& src);
58
60 std::string const& getName() const { return _name; }
61
62 void setName(std::string const& name) { _name = name; }
63
66 static Station* createStation(const std::string& line);
67
69 static Station* createStation(const std::string& name, double x, double y,
70 double z);
71
73 double getStationValue() const { return this->_station_value; }
74
77 void setStationValue(double station_value)
78 {
79 this->_station_value = station_value;
80 }
81
83 void addSensorDataFromCSV(const std::string& file_name)
84 {
85 _sensor_data.reset(new SensorData(file_name));
86 }
87
89 const SensorData* getSensorData() const { return _sensor_data.get(); }
90
91private:
92 std::string _name;
93 double _station_value{0.0};
94 std::unique_ptr<SensorData> _sensor_data{nullptr};
95};
96
97bool isStation(GeoLib::Point const* pnt);
98} // namespace GeoLib
Definition of the Point class.
Definition of the SensorData class.
A Station (observation site) is basically a Point with some additional information.
Definition Station.h:37
double _station_value
Definition Station.h:93
Station(double x=0.0, double y=0.0, double z=0.0, std::string name="")
Constructor.
Definition Station.cpp:25
void addSensorDataFromCSV(const std::string &file_name)
Allows to add sensor data from a CSV file to the observation site.
Definition Station.h:83
std::unique_ptr< SensorData > _sensor_data
Definition Station.h:94
std::string _name
Definition Station.h:92
double getStationValue() const
Returns the specific value for this station.
Definition Station.h:73
std::string const & getName() const
Returns the name of the station.
Definition Station.h:60
const SensorData * getSensorData() const
Returns all the sensor data for this observation site.
Definition Station.h:89
void setName(std::string const &name)
Definition Station.h:62
static Station * createStation(const std::string &line)
Definition Station.cpp:46
void setStationValue(double station_value)
Definition Station.h:77
A container for sensor data at an observation site. The class stores a number of time series and has ...
Definition SensorData.h:63
bool isStation(GeoLib::Point const *pnt)
Definition Station.cpp:77