28 #pragma warning(disable:4512) //we don't need any = operator!
35 A3DIO(
const std::string& configfile);
41 std::vector< std::vector<MeteoData> >& vecMeteo);
43 virtual void writeMeteoData(
const std::vector< std::vector<MeteoData> >& vecMeteo,
44 const std::string& name=
"");
46 virtual void readPOI(std::vector<Coords>& pts);
50 void read1DMeteo(
const Date& dateStart,
const Date& dateEnd, std::vector< std::vector<MeteoData> >&);
51 void read2DStations(
const Date& timestamp, std::vector<StationData>& vecStation);
52 void read2DMeteo(std::vector< std::vector<MeteoData> >&);
54 void constructMeteo2DFilenames(
const Date& i_startDate,
const Date& i_endDate, std::vector<std::string>& i_filenames);
55 bool readMeteoDataLine(std::string& line,
MeteoData& tmpdata, std::string filename);
57 void read2DMeteoData(
const std::string&,
const std::string&, std::map<std::string,size_t>& hashStations,
58 std::vector< std::vector<MeteoData> >&,
size_t& bufferindex);
59 void read2DMeteoHeader(
const std::string& filename, std::map<std::string, size_t>& hashStations,
60 std::vector<StationData>&);
61 size_t getNrOfStations(std::vector<std::string>& filenames,
62 std::map<std::string, size_t>& hashStations);
64 int create1DFile(
const std::vector< std::vector<MeteoData> >& data);
65 int writeHeader(std::ofstream &file,
const std::vector< std::vector<MeteoData> >& stations,
const std::string& parameter_name);
66 void open2DFile(
const std::vector< std::vector<MeteoData> >& stations,
67 const std::string& fileprefix,
const std::string& label,
const double& year,
69 int write2DmeteoFile(
const std::vector< std::vector<MeteoData> >& data,
const unsigned int& parindex,
70 const std::string& filename,
const std::string& label);
71 void write2DMeteo(
const std::vector< std::vector<MeteoData> >& data);
76 std::string coordin, coordinparam, coordout, coordoutparam;
78 static const double plugin_nodata;
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 readStationData(const Date &date, std::vector< StationData > &vecStation)
Fill vecStation with StationData objects for a certain date of interest.
Definition: A3DIO.cc:97
virtual void writeMeteoData(const std::vector< std::vector< MeteoData > > &vecMeteo, const std::string &name="")
Write vecMeteo time series to a certain destination.
Definition: A3DIO.cc:88
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: A3DIO.cc:641
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
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
A3DIO(const std::string &configfile)
Definition: A3DIO.cc:66
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: A3DIO.cc:117