KernelParams.h
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib 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,
8  or (at your option) any later version.
9 
10  TerraLib 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 TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 /*!
21  \file terralib/sa/core/KernelParams.h
22 
23  \brief This file contains a class that represents the kernel parameters.
24 
25  \reference Adapted from TerraLib4.
26 */
27 
28 #ifndef __TERRALIB_SA_INTERNAL_KERNELPARAMS_H
29 #define __TERRALIB_SA_INTERNAL_KERNELPARAMS_H
30 
31 // Terralib Includes
32 #include "../../dataaccess/dataset/DataSet.h"
33 #include "../../dataaccess/dataset/DataSetType.h"
34 #include "../Config.h"
35 #include "../Enums.h"
36 
37 // STL Includes
38 #include <map>
39 #include <memory>
40 #include <string>
41 
42 namespace te
43 {
44  namespace sa
45  {
46  /*!
47  \class KernelInputParams
48 
49  \brief Class that represents the kernel input parameters.
50 
51  \sa KernelOperation
52  */
53 
55  {
56  public:
57 
58  /*! \brief Default constructor. */
60  {
61  m_intensityAttrName = "";
62  m_functionType = te::sa::Normal;
63  m_estimationType = te::sa::Density;
64  m_useAdaptativeRadius = true;
65  m_radiusPercentValue = 10;
66  }
67 
68  /*! \brief Virtual destructor. */
70  {
71  }
72 
73  public:
74 
75  std::unique_ptr<te::da::DataSetType> m_dsType; //!< Attribute used to access the data set metadata
76  std::unique_ptr<te::da::DataSet> m_ds; //!< Attribute with data set
78 
79  std::string m_intensityAttrName; //!< Attribute from dataset used as intensity attr (not obrigatory)
80 
81  te::sa::KernelFunctionType m_functionType; //!< Kernel function type
82  te::sa::KernelEstimationType m_estimationType; //!< Kernel estimation type
83 
84  bool m_useAdaptativeRadius; //!< Attribute to indicate if a an adaptative radius has to be used.
85  int m_radiusPercentValue; //!< Attribute with radius percent value (m_useAdaptativeRadius must be false)
86  };
87 
88  /*!
89  \class KernelOutputParams
90 
91  \brief Class that represents the kernel output parameters.
92 
93  \sa KernelOperation
94  */
95 
97  {
98  public:
99 
100  /*! \brief Default constructor. */
102  {
103  m_storageType = te::sa::Grid; //!< Kernel storage type
104  m_combinationType = te::sa::Ratio;
105  m_nCols = 50;
106  m_nRows = 50;
107  m_outputAttrName = "";
108  m_outputPath = "";
109  m_outputDataSetName = "";
110  }
111 
112  /*! \brief Virtual destructor. */
114  {
115  }
116 
117  public:
118 
119  te::sa::KernelOutputType m_storageType; //!< Kernel storage type
120  te::sa::KernelCombinationType m_combinationType; //!< Kernel combination type (used by ratio kernel)
121 
122  int m_nCols; //!< Attribute with number of columns to create the grid (if KernelOutputType is Grid)
123  int m_nRows; //!< Attribute with number of rows to create the grid (if KernelOutputType is Grid)
124  std::string m_outputAttrName; //!< Attribute with the new attr name (if KernelOutputType is Attribute)
125  std::string m_outputPath; //!< Attribute with URI of the output file
126  std::string m_outputDataSetName; //!< Attribute that defines the output dataset name
127  };
128  } // end namespace sa
129 } // end namespace te
130 
131 #endif //__TERRALIB_SA_INTERNAL_KERNELPARAMS_H
Class that represents the kernel input parameters.
Definition: KernelParams.h:54
KernelEstimationType
Definition: Enums.h:77
te::sa::KernelOutputType m_storageType
Kernel storage type.
Definition: KernelParams.h:119
KernelOutputParams()
Default constructor.
Definition: KernelParams.h:101
KernelCombinationType
Types of kernel combination.
Definition: Enums.h:89
std::unique_ptr< te::da::DataSetType > m_dsType
Attribute used to access the data set metadata.
Definition: KernelParams.h:75
Class that represents the kernel output parameters.
Definition: KernelParams.h:96
KernelInputParams()
Default constructor.
Definition: KernelParams.h:59
int m_radiusPercentValue
Attribute with radius percent value (m_useAdaptativeRadius must be false)
Definition: KernelParams.h:85
An Envelope defines a 2D rectangular region.
Definition: Envelope.h:51
TerraLib.
te::gm::Envelope m_extentLayer
Definition: KernelParams.h:77
te::sa::KernelFunctionType m_functionType
Kernel function type.
Definition: KernelParams.h:81
~KernelOutputParams()
Virtual destructor.
Definition: KernelParams.h:113
std::string m_outputAttrName
Attribute with the new attr name (if KernelOutputType is Attribute)
Definition: KernelParams.h:124
te::sa::KernelCombinationType m_combinationType
Kernel combination type (used by ratio kernel)
Definition: KernelParams.h:120
KernelOutputType
Defines the kernel result storage mode.
Definition: Enums.h:104
std::string m_outputPath
Attribute with URI of the output file.
Definition: KernelParams.h:125
#define TESAEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:133
te::sa::KernelEstimationType m_estimationType
Kernel estimation type.
Definition: KernelParams.h:82
bool m_useAdaptativeRadius
Attribute to indicate if a an adaptative radius has to be used.
Definition: KernelParams.h:84
std::string m_outputDataSetName
Attribute that defines the output dataset name.
Definition: KernelParams.h:126
KernelFunctionType
Definition: Enums.h:63
int m_nRows
Attribute with number of rows to create the grid (if KernelOutputType is Grid)
Definition: KernelParams.h:123
std::string m_intensityAttrName
Attribute from dataset used as intensity attr (not obrigatory)
Definition: KernelParams.h:79
int m_nCols
Attribute with number of columns to create the grid (if KernelOutputType is Grid) ...
Definition: KernelParams.h:122
std::unique_ptr< te::da::DataSet > m_ds
Attribute with data set.
Definition: KernelParams.h:76
~KernelInputParams()
Virtual destructor.
Definition: KernelParams.h:69