28 #pragma warning(disable:4512) //we don't need any = operator!
43 SMETIO(
const std::string& configfile);
49 std::vector< std::vector<MeteoData> >& vecMeteo);
51 virtual void writeMeteoData(
const std::vector< std::vector<MeteoData> >& vecMeteo,
52 const std::string& name=
"");
54 virtual void readPOI(std::vector<Coords>& pts);
58 void identify_fields(
const std::vector<std::string>& fields, std::vector<size_t>& indexes,
60 void copy_data(
const smet::SMETReader& myreader,
const std::vector<std::string>& timestamps,
61 const std::vector<double>& mydata, std::vector<MeteoData>& vecMeteo);
63 void parseInputOutputSection();
64 bool checkConsistency(
const std::vector<MeteoData>& vecMeteo,
StationData& sd);
65 size_t getNrOfParameters(
const std::string& stationname,
const std::vector<MeteoData>& vecMeteo);
66 void checkForUsedParameters(
const std::vector<MeteoData>& vecMeteo,
const size_t& nr_parameters,
double& tz,
67 std::vector<bool>& vecParamInUse, std::vector<std::string>& vecColumnName);
68 static void getPlotProperties(
const size_t& param, std::ostringstream &plot_units, std::ostringstream &plot_description, std::ostringstream &plot_color, std::ostringstream &plot_min, std::ostringstream &plot_max);
69 static void getFormatting(
const size_t& param,
int& prec,
int& width);
70 double olwr_to_tss(
const double& olwr);
71 void generateHeaderInfo(
const StationData& sd,
const bool& i_outputIsAscii,
const bool& isConsistent,
72 const double& timezone,
const size_t& nr_of_parameters,
73 const std::vector<bool>& vecParamInUse,
74 const std::vector<std::string>& vecColumnName,
77 static const char* dflt_extension;
79 std::string coordin, coordinparam, coordout, coordoutparam;
80 std::vector<smet::SMETReader> vec_smet_reader;
81 std::vector<std::string> vecFiles;
86 bool outputIsAscii, outputPlotHeaders;
virtual void writeMeteoData(const std::vector< std::vector< MeteoData > > &vecMeteo, const std::string &name="")
Write vecMeteo time series to a certain destination.
Definition: SMETIO.cc:385
A class representing the IO Layer of the software Alpine3D. For each type of IO (File, DB, Webservice, etc) a derived class is to be created that holds the specific implementation of the appropriate virtual methods. The IOHandler class is a wrapper class that is able to deal with all above implementations of the IOInterface abstract base class.
Definition: IOInterface.h:43
virtual void readPOI(std::vector< Coords > &pts)
Read a list of points by their grid coordinates This allows for example to get a list of points where...
Definition: SMETIO.cc:719
The SMETWriter class that enables to write a SMET formatted file. The user constructs a SMETWriter cl...
Definition: libsmet.h:94
Reads meteo data in the SMET ASCII or binary format.
Definition: SMETIO.h:41
The SMETReader class enables to read a SMET formatted file. Data and header info can be extracted thr...
Definition: libsmet.h:195
SMETIO(const std::string &configfile)
Definition: SMETIO.cc:83
A class that reads a key/value file. These files (typically named *.ini) follow the INI file format s...
Definition: Config.h:58
A class to handle timestamps. This class handles conversion between different time display formats (I...
Definition: Date.h:79
virtual void readMeteoData(const Date &dateStart, const Date &dateEnd, std::vector< std::vector< MeteoData > > &vecMeteo)
Fill vecMeteo with a time series of objects corresponding to the interval indicated by dateStart and ...
Definition: SMETIO.cc:355
A class to represent meteo stations with attributes like longitude, latitude, etc.
Definition: StationData.h:38
A class to represent a singular measurement received from one station at a certain time (represented ...
Definition: MeteoData.h:101
virtual void readStationData(const Date &date, std::vector< StationData > &vecStation)
Fill vecStation with StationData objects for a certain date of interest.
Definition: SMETIO.cc:101