MeteoIODoc 2.11.0
ARCIO.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-3.0-or-later
2/***********************************************************************************/
3/* Copyright 2009 WSL Institute for Snow and Avalanche Research SLF-DAVOS */
4/***********************************************************************************/
5/* This file is part of MeteoIO.
6 MeteoIO is free software: you can redistribute it and/or modify
7 it under the terms of the GNU Lesser General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 MeteoIO is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public License
17 along with MeteoIO. If not, see <http://www.gnu.org/licenses/>.
18*/
19#ifndef ARCIO_H
20#define ARCIO_H
21
22#include <meteoio/IOInterface.h>
23
24#include <string>
25
26namespace mio {
27
37class ARCIO : public IOInterface {
38 public:
39 ARCIO(const std::string& configfile);
40 ARCIO(const ARCIO&);
41 ARCIO(const Config&);
42
43 virtual bool list2DGrids(const Date& start, const Date& end, std::map<Date, std::set<size_t> > &list);
44 virtual void read2DGrid(Grid2DObject& dem_out, const std::string& parameter="");
45 virtual void read2DGrid(Grid2DObject& grid_out, const MeteoGrids::Parameters& parameter, const Date& date);
46
47 virtual void readDEM(DEMObject& dem_out);
48 virtual void readLanduse(Grid2DObject& landuse_out);
49 virtual void readGlacier(Grid2DObject& glaciers_out);
50
51 virtual void readAssimilationData(const Date&, Grid2DObject& da_out);
52
53 virtual void write2DGrid(const Grid2DObject& grid_in, const std::string& options);
54 virtual void write2DGrid(const Grid2DObject& grid_in, const MeteoGrids::Parameters& parameter, const Date& date);
55
56 private:
57 void getGridPaths();
58 void read2DGrid_internal(Grid2DObject& grid_out, const std::string& full_name);
59 void write2DGrid_internal(const Grid2DObject& grid_in, const std::string& options) const;
60 const Config cfg;
61
62 std::string coordin, coordinparam, coordout, coordoutparam; //projection parameters
63 std::string grid2dpath_in, grid2dpath_out;
64 std::string grid2d_ext_in, grid2d_ext_out; //file extension
65
66 bool a3d_view_in, a3d_view_out;
67};
68
69} //end namespace mio
70
71#endif
This class enables the access to 2D grids stored in ESRI ASCII (ARCGIS) format.
Definition: ARCIO.h:37
virtual void readGlacier(Grid2DObject &glaciers_out)
Parse the input glacier grid into the Grid2DObject.
Definition: ARCIO.cc:317
virtual void write2DGrid(const Grid2DObject &grid_in, const std::string &options)
Write a Grid2DObject The filename is specified relative to GRID2DPATH for most plugins.
Definition: ARCIO.cc:332
virtual void readDEM(DEMObject &dem_out)
Parse the DEM (Digital Elevation Model) into the Grid2DObject.
Definition: ARCIO.cc:305
ARCIO(const ARCIO &)
virtual bool list2DGrids(const Date &start, const Date &end, std::map< Date, std::set< size_t > > &list)
Return the list of grids within a given time period that could be read by the plugin,...
Definition: ARCIO.cc:210
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:323
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:205
virtual void readLanduse(Grid2DObject &landuse_out)
Parse the landuse model into the Grid2DObject.
Definition: ARCIO.cc:311
ARCIO(const std::string &configfile)
Definition: ARCIO.cc:77
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 represent DEMs and automatically compute some properties. This class stores elevation grid...
Definition: DEMObject.h:40
A class to handle timestamps. This class handles conversion between different time display formats (I...
Definition: Date.h:87
A class to represent 2D Grids. Typical application as DEM or Landuse Model.
Definition: Grid2DObject.h:42
A class representing the IO Layer of the software Alpine3D. For each type of IO (File,...
Definition: IOInterface.h:98
Parameters
this enum provides names for possible meteogrids (from an ARPS file, etc)
Definition: MeteoData.h:46
Definition: Config.cc:31