47 iCSVIO(
const std::string &configfile);
52 virtual void readMeteoData(
const Date &dateStart,
const Date &dateEnd, std::vector<std::vector<MeteoData>> &vecMeteo);
54 virtual void writeMeteoData(
const std::vector<std::vector<MeteoData>> &vecMeteo,
const std::string &name =
"");
59 std::string coordin, coordinparam, coordout, coordoutparam;
64 std::vector<iCSVFile> stations_files;
73 std::string file_extension_out;
77 const std::string iCSV_version =
"1.0";
78 const std::string iCSV_firstline =
"# iCSV " + iCSV_version +
" UTF-8";
79 static const double snVirtualSlopeAngle;
82 void parseInputSection();
83 void parseOutputSection();
86 void identify_fields(
const std::vector<std::string> &fields, std::vector<size_t> &indexes,
MeteoData &md,
87 const std::string &geometry_field);
88 double getSnowpackSlope(
const std::string &
id);
90 void setMetaDataPosition(
const iCSVFile ¤t_file,
StationData &meta,
const double &nodata_value);
91 void setMetaDataSlope(
const iCSVFile ¤t_file,
StationData &meta,
const double &nodata_value);
93 void readDataSequential(
iCSVFile ¤t_file);
94 std::vector<MeteoData> createMeteoDataVector(
iCSVFile ¤t_file, std::vector<Date> &date_vec,
95 std::vector<geoLocation> &location_vec);
100 void prepareOutfile(
iCSVFile &outfile,
const std::vector<MeteoData> &vecMeteo,
bool file_exists);
101 void handleNewFile(
iCSVFile &outfile,
const std::vector<MeteoData> &vecMeteo,
bool file_exists);
102 void handleFileAppend(
iCSVFile &outfile,
const std::vector<MeteoData> &vecMeteo);
105 bool checkLocationConsistency(
const std::vector<MeteoData> &vecMeteo);
107 void createMetaDataSection(
iCSVFile ¤t_file,
const std::vector<MeteoData> &vecMeteo);
108 void createFieldsSection(
iCSVFile ¤t_file,
const std::vector<MeteoData> &vecMeteo);
109 void writeToFile(
const iCSVFile &outfile);
This class contains and handles NetCDF Attribute Conventions Dataset Discovery attributes (see ACDD).
Definition: libacdd.h:113
A class that reads a key/value file. These files (typically named *.ini) follow the INI file format s...
Definition: Config.h:79
A class to handle timestamps. This class handles conversion between different time display formats (I...
Definition: Date.h:87
A class representing the IO Layer of the software Alpine3D. For each type of IO (File,...
Definition: IOInterface.h:98
A class to represent a singular measurement received from one station at a certain time (represented ...
Definition: MeteoData.h:107
A class to represent meteo stations with attributes like longitude, latitude, etc.
Definition: StationData.h:41
A class to read and write iCSV files.
Definition: iCSVIO.h:45
virtual void readStationData(const Date &date, std::vector< StationData > &vecStation)
Fill vecStation with StationData objects for a certain date of interest.
Definition: iCSVIO.cc:242
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: iCSVIO.cc:256
virtual void writeMeteoData(const std::vector< std::vector< MeteoData > > &vecMeteo, const std::string &name="")
Write vecMeteo time series to a certain destination.
Definition: iCSVIO.cc:506
iCSVIO(const std::string &configfile)
Definition: iCSVIO.cc:168
This class is responsible for handling and storing iCSV files.
Definition: iCSVHelper.h:297
const double nodata
This is the internal nodata value.
Definition: IOUtils.h:75
Represents a geographic location extracted from iCSV files. (POINT(X Y)...)
Definition: iCSVHelper.h:39