MeteoIODoc  MeteoIODoc-2.6.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ARCIO.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 ARCIO_H
19 #define ARCIO_H
20 
21 #include <meteoio/IOInterface.h>
22 
23 #include <string>
24 
25 namespace mio {
26 
36 class ARCIO : public IOInterface {
37  public:
38  ARCIO(const std::string& configfile);
39  ARCIO(const ARCIO&);
40  ARCIO(const Config&);
41 
42  virtual void read2DGrid(Grid2DObject& dem_out, const std::string& parameter="");
43  virtual void read2DGrid(Grid2DObject& grid_out, const MeteoGrids::Parameters& parameter, const Date& date);
44 
45  virtual void readDEM(DEMObject& dem_out);
46  virtual void readLanduse(Grid2DObject& landuse_out);
47  virtual void readAssimilationData(const Date&, Grid2DObject& da_out);
48 
49  virtual void write2DGrid(const Grid2DObject& grid_in, const std::string& filename);
50  virtual void write2DGrid(const Grid2DObject& grid_in, const MeteoGrids::Parameters& parameter, const Date& date);
51 
52  private:
53  void getGridPaths();
54  void read2DGrid_internal(Grid2DObject& grid_out, const std::string& full_name);
55  const Config cfg;
56 
57  std::string coordin, coordinparam, coordout, coordoutparam; //projection parameters
58  std::string grid2dpath_in, grid2dpath_out;
59  std::string grid2d_ext_in, grid2d_ext_out; //file extension
60 
61  bool a3d_view_in, a3d_view_out;
62 };
63 
64 } //end namespace mio
65 
66 #endif
virtual void readAssimilationData(const Date &, Grid2DObject &da_out)
Parse the assimilation data into a Grid2DObject for a certain date represented by the Date object...
Definition: ARCIO.cc:241
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 read2DGrid(Grid2DObject &dem_out, const std::string &parameter="")
A generic function for parsing 2D grids into a Grid2DObject. The string parameter shall be used for a...
Definition: ARCIO.cc:197
virtual void write2DGrid(const Grid2DObject &grid_in, const std::string &filename)
Write a Grid2DObject The filename is specified relative to GRID2DPATH for most plugins.
Definition: ARCIO.cc:250
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 represent DEMs and automatically compute some properties. This class stores elevation grid...
Definition: DEMObject.h:39
A class to represent 2D Grids. Typical application as DEM or Landuse Model.
Definition: Grid2DObject.h:37
A class to handle timestamps. This class handles conversion between different time display formats (I...
Definition: Date.h:79
virtual void readLanduse(Grid2DObject &landuse_out)
Parse the landuse model into the Grid2DObject.
Definition: ARCIO.cc:235
Parameters
Definition: MeteoData.h:44
This class enables the access to 2D grids stored in ESRI ASCII (ARCGIS) format.
Definition: ARCIO.h:36
ARCIO(const std::string &configfile)
Definition: ARCIO.cc:63
virtual void readDEM(DEMObject &dem_out)
Parse the DEM (Digital Elevation Model) into the Grid2DObject.
Definition: ARCIO.cc:229