MeteoIODoc  MeteoIODoc-2.6.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ProcShade.h
Go to the documentation of this file.
1 /***********************************************************************************/
2 /* Copyright 2012 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 PROCSHADE_H
19 #define PROCSHADE_H
20 
22 #include <meteoio/Config.h>
24 #include <vector>
25 #include <string>
26 
27 namespace mio {
28 
58 class ProcShade : public ProcessingBlock {
59  public:
60  ProcShade(const std::vector<std::string>& vec_args, const std::string& name, const Config &i_cfg);
61 
62  virtual void process(const unsigned int& param, const std::vector<MeteoData>& ivec,
63  std::vector<MeteoData>& ovec);
64 
65  static void computeMask(const DEMObject& i_dem, const StationData& sd, std::vector< std::pair<double,double> > &o_mask, const bool& dump_mask=false);
66 
67  private:
68  static void readMask(const std::string& filter, const std::string& filename, std::vector< std::pair<double,double> > &o_mask);
69  void parse_args(const std::vector<std::string>& vec_args);
70  double getMaskElevation(const std::vector< std::pair<double,double> > &mask, const double& azimuth) const;
71 
72  const Config &cfg;
73  DEMObject dem;
74  std::map< std::string , std::vector< std::pair<double,double> > > masks;
75 
76  static const double diffuse_thresh;
77 };
78 
79 } //end namespace
80 
81 #endif
Apply a shading mask to the Incoming or Reflected Short Wave Radiation A shading mask that is either ...
Definition: ProcShade.h:58
ProcShade(const std::vector< std::string > &vec_args, const std::string &name, const Config &i_cfg)
Definition: ProcShade.cc:42
An abstract class.
Definition: ProcessingBlock.h:63
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
virtual void process(const unsigned int &param, const std::vector< MeteoData > &ivec, std::vector< MeteoData > &ovec)
Definition: ProcShade.cc:49
A class to represent meteo stations with attributes like longitude, latitude, etc.
Definition: StationData.h:38
static void computeMask(const DEMObject &i_dem, const StationData &sd, std::vector< std::pair< double, double > > &o_mask, const bool &dump_mask=false)
Definition: ProcShade.cc:197