MeteoIODoc  MeteoIODoc-2.6.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
IOInterface.h
Go to the documentation of this file.
1 /***********************************************************************************/
2 /* Copyright 2009 WSL Institute for Snow and Avalanche Research SLF-DAVOS */
3 /***********************************************************************************/
4 /* This file is part of MeteoIO.
5  MeteoIO is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9 
10  MeteoIO is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with MeteoIO. If not, see <http://www.gnu.org/licenses/>.
17 */
18 #ifndef IOINTERFACE_H
19 #define IOINTERFACE_H
20 
21 #include <meteoio/Config.h> //so the plugins can get access to Config for their constructor
27 
28 #include <vector>
29 #include <string>
30 
31 namespace mio {
32 
43 class IOInterface {
44  public:
45  virtual ~IOInterface() {}
46 
53  virtual void read2DGrid(Grid2DObject& grid_out, const std::string& parameter="");
54 
62  virtual void read2DGrid(Grid2DObject& grid_out, const MeteoGrids::Parameters& parameter, const Date& date);
63 
70  virtual void read3DGrid(Grid3DObject& grid_out, const std::string& parameter="");
71 
79  virtual void read3DGrid(Grid3DObject& grid_out, const MeteoGrids::Parameters& parameter, const Date& date);
80 
92  virtual void readDEM(DEMObject& dem_out);
93 
105  virtual void readLanduse(Grid2DObject& landuse_out);
106 
120  virtual void readStationData(const Date& date, std::vector<StationData>& vecStation);
121 
144  virtual void readMeteoData(const Date& dateStart, const Date& dateEnd,
145  std::vector< std::vector<MeteoData> >& vecMeteo);
146 
170  virtual void writeMeteoData(const std::vector< std::vector<MeteoData> >& vecMeteo,
171  const std::string& name="");
172 
186  virtual void readAssimilationData(const Date& date_in, Grid2DObject& da_out);
187 
193  virtual void readPOI(std::vector<Coords>& pts);
194 
201  virtual void write2DGrid(const Grid2DObject& grid_out, const std::string& options="");
202 
210  virtual void write2DGrid(const Grid2DObject& grid_out, const MeteoGrids::Parameters& parameter, const Date& date);
211 
218  virtual void write3DGrid(const Grid3DObject& grid_out, const std::string& options="");
219 
227  virtual void write3DGrid(const Grid3DObject& grid_out, const MeteoGrids::Parameters& parameter, const Date& date);
228 
229 };
230 
231 } //end namespace
232 
233 #endif
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: IOInterface.cc:121
virtual void readLanduse(Grid2DObject &landuse_out)
Parse the landuse model into the Grid2DObject.
Definition: IOInterface.cc:94
virtual void readAssimilationData(const Date &date_in, Grid2DObject &da_out)
Parse the assimilation data into a Grid2DObject for a certain date represented by the Date object...
Definition: IOInterface.cc:116
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 write3DGrid(const Grid3DObject &grid_out, const std::string &options="")
Write a Grid3DObject The filename is specified relative to GRID3DPATH for most plugins.
Definition: IOInterface.cc:136
A class to represent 3D Grids. Typical application: wind field.
Definition: Grid3DObject.h:38
virtual ~IOInterface()
Definition: IOInterface.h:45
virtual void write2DGrid(const Grid2DObject &grid_out, const std::string &options="")
Write a Grid2DObject The filename is specified relative to GRID2DPATH for most plugins.
Definition: IOInterface.cc:126
A class to represent DEMs and automatically compute some properties. This class stores elevation grid...
Definition: DEMObject.h:39
virtual void read2DGrid(Grid2DObject &grid_out, const std::string &parameter="")
A generic function for parsing 2D grids into a Grid2DObject. The string parameter shall be used for a...
Definition: IOInterface.cc:69
A class to represent 2D Grids. Typical application as DEM or Landuse Model.
Definition: Grid2DObject.h:37
virtual void writeMeteoData(const std::vector< std::vector< MeteoData > > &vecMeteo, const std::string &name="")
Write vecMeteo time series to a certain destination.
Definition: IOInterface.cc:110
A class to handle timestamps. This class handles conversion between different time display formats (I...
Definition: Date.h:79
virtual void read3DGrid(Grid3DObject &grid_out, const std::string &parameter="")
A generic function for parsing 3D grids into a Grid3DObject. The string parameter shall be used for a...
Definition: IOInterface.cc:79
virtual void readDEM(DEMObject &dem_out)
Parse the DEM (Digital Elevation Model) into the Grid2DObject.
Definition: IOInterface.cc:89
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: IOInterface.cc:104
Parameters
Definition: MeteoData.h:44
virtual void readStationData(const Date &date, std::vector< StationData > &vecStation)
Fill vecStation with StationData objects for a certain date of interest.
Definition: IOInterface.cc:99