Shadow.h
Go to the documentation of this file.
1 /*!
2 \file terralib/mnt/core/Shadow.h
3 
4 \brief This file contains a class to shadow image generation.
5 Adapted from SPRING
6 */
7 
8 #ifndef __TERRALIB_MNT_INTERNAL_SHADOW_H
9 #define __TERRALIB_MNT_INTERNAL_SHADOW_H
10 
11 // Terralib Includes
12 #include "Config.h"
13 #include "Enums.h"
14 
15 #include "../../dataaccess/dataset/DataSet.h"
16 #include "../../dataaccess/dataset/DataSetType.h"
17 #include "../../dataaccess/datasource/DataSource.h"
18 
19 namespace te
20 {
21  namespace mnt
22  {
24  {
25  public:
26  Shadow();
28 
30  std::string inDsetName,
31  const te::da::DataSetTypePtr& inDsetType);
32 
33  void setOutput(std::map<std::string, std::string> &dsinfo, std::string outRstDSType);
34 
35  void setParams(double azimuth, double elevation, double relief, double dummy,
36  double vmin, double vmax, double minval, double maxval,
37  unsigned int outputWidth, unsigned int outputHeight, double resxo, double resyo);
38 
39  /*! Function used to set the Spatial Reference System ID */
40  void setSRID(int srid) { m_srid = srid; }
41 
42  bool run();
43 
44  te::rst::Raster *getOutRst() { return m_out; }
45 
47 
48  private:
49 
50  bool calcLocalGradient(te::rst::Raster* inputRaster, int line, int col, double vmin, double vmax, double& dx, double& dy, double *val);
51  void getRasterElementLine(te::rst::Raster* inputRaster, int line, std::vector< std::complex<double> > &val);
52 
53  protected:
54 
56  std::string m_inDsetName;
58  std::unique_ptr<te::da::DataSet> inDset;
59 
60  std::map<std::string, std::string> m_outDsinfo;
61  std::string m_outRstDSType;
63 
64  int m_srid; //!< Attribute with spatial reference information
65 
66  double m_azimuth;
67  double m_elevation;
68  double m_relief;
69  double m_vmin, m_vmax;
70  double m_minval;
71  double m_maxval;
72 
73  double m_dummy;
74  unsigned int m_outputWidth;
75  unsigned int m_outputHeight;
76 
77  double m_resxo, m_resyo;
78  };
79  }
80 }
81 #endif //__TERRALIB_MNT_INTERNAL_SMOOTH_H
te::mnt::Shadow
Definition: Shadow.h:24
te::mnt::Shadow::run
bool run()
te::mnt::Shadow::getRasterElementLine
void getRasterElementLine(te::rst::Raster *inputRaster, int line, std::vector< std::complex< double > > &val)
te
TerraLib.
Definition: AddressGeocodingOp.h:52
te::mnt::Shadow::m_outDsinfo
std::map< std::string, std::string > m_outDsinfo
Definition: Shadow.h:60
te::mnt::Shadow::m_outRstDSType
std::string m_outRstDSType
Definition: Shadow.h:61
te::da::DataSetTypePtr
boost::shared_ptr< DataSetType > DataSetTypePtr
Definition: DataSetType.h:653
te::mnt::Shadow::m_inDsetName
std::string m_inDsetName
Definition: Shadow.h:56
te::mnt::Shadow::m_outputHeight
unsigned int m_outputHeight
Definition: Shadow.h:75
te::mnt::Shadow::GenerateImage
te::rst::Raster * GenerateImage(te::rst::Raster *raster)
te::mnt::Shadow::m_resyo
double m_resyo
Definition: Shadow.h:77
te::rst::Raster
An abstract class for raster data strucutures.
Definition: Raster.h:72
te::mnt::Shadow::setInput
void setInput(te::da::DataSourcePtr inDsrc, std::string inDsetName, const te::da::DataSetTypePtr &inDsetType)
te::mnt::Shadow::inDset
std::unique_ptr< te::da::DataSet > inDset
Definition: Shadow.h:58
te::mnt::Shadow::m_srid
int m_srid
Attribute with spatial reference information.
Definition: Shadow.h:64
te::mnt::Shadow::m_minval
double m_minval
Definition: Shadow.h:70
te::mnt::Shadow::m_azimuth
double m_azimuth
Definition: Shadow.h:66
Enums.h
Enumerations of XML module.
te::mnt::Shadow::m_dummy
double m_dummy
Definition: Shadow.h:73
te::mnt::Shadow::Shadow
Shadow()
te::mnt::Shadow::m_maxval
double m_maxval
Definition: Shadow.h:71
te::mnt::Shadow::m_inDsrc
te::da::DataSourcePtr m_inDsrc
Definition: Shadow.h:55
te::mnt::Shadow::getOutRst
te::rst::Raster * getOutRst()
Definition: Shadow.h:44
te::mnt::Shadow::m_relief
double m_relief
Definition: Shadow.h:68
te::mnt::Shadow::m_out
te::rst::Raster * m_out
Definition: Shadow.h:62
te::mnt::Shadow::m_inDsetType
te::da::DataSetTypePtr m_inDsetType
Definition: Shadow.h:57
te::mnt::Shadow::m_vmin
double m_vmin
Definition: Shadow.h:69
te::mnt::Shadow::m_elevation
double m_elevation
Definition: Shadow.h:67
te::mnt::Shadow::~Shadow
~Shadow()
te::mnt::Shadow::m_outputWidth
unsigned int m_outputWidth
Definition: Shadow.h:74
te::da::DataSourcePtr
boost::shared_ptr< DataSource > DataSourcePtr
Definition: DataSource.h:1449
te::mnt::Shadow::setParams
void setParams(double azimuth, double elevation, double relief, double dummy, double vmin, double vmax, double minval, double maxval, unsigned int outputWidth, unsigned int outputHeight, double resxo, double resyo)
Config.h
Proxy configuration file for TerraView (see terraview_config.h).
te::mnt::Shadow::calcLocalGradient
bool calcLocalGradient(te::rst::Raster *inputRaster, int line, int col, double vmin, double vmax, double &dx, double &dy, double *val)
te::mnt::Shadow::setOutput
void setOutput(std::map< std::string, std::string > &dsinfo, std::string outRstDSType)
TEMNTEXPORT
#define TEMNTEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:41
te::mnt::Shadow::setSRID
void setSRID(int srid)
Definition: Shadow.h:40