TINCalculateGrid.h
Go to the documentation of this file.
1 /*!
2 \file terralib/mnt/core/TINCalculateGrid.h
3 
4 \brief This file contains a class to calculate a grid from a TIN.
5 Adapted from SPRING
6 
7 */
8 
9 #ifndef __TERRALIB_MNT_INTERNAL_TINCALCULATEGRID_H
10 #define __TERRALIB_MNT_INTERNAL_TINCALCULATEGRID_H
11 
12 // Terralib Includes
13 #include "Config.h"
14 #include "Tin.h"
15 
16 #include "../../dataaccess/dataset/DataSet.h"
17 #include "../../dataaccess/dataset/DataSetType.h"
18 #include "../../dataaccess/datasource/DataSource.h"
19 
20 #include "../../raster/Raster.h"
21 
22 namespace te
23 {
24  namespace mnt
25  {
26 
27  /*!
28  \class TINCalculateGrid
29  \brief Class to calculate grid from TIN.
30 
31  \ingroup mnt
32 
33  */
34 
36  {
37  public:
40 
41  bool run();
42 
43  /*!
44  \brief It sets the Datasource that is being used to generate TIN.
45  \param inDsrc The datasource being used.
46  \param inDsetName datasource name
47  \param inDsetType input DataSetType
48  */
50  std::string inDsetName,
51  std::unique_ptr<te::da::DataSetType> inDsetType);
52 
53  /*!
54  \brief It sets the Datasource that is being used to save TIN.
55  */
56  void setOutput(std::map<std::string, std::string> &dsinfo);
57 
58  /*!
59  \brief It sets the parameters that is being used to save TIN.
60  \param resx, resy resolution X and Y.
61  \param gt interpolator
62  */
63  void setParams(double resx, double resy, Interpolator gt);
64 
65  protected:
66 
67  bool FillGridLinear(int32_t triid, te::gm::Point *p3da, int32_t flin, int32_t llin, int32_t fcol, int32_t lcol);
68 
69  /*!
70  \brief Method that fills the grid locations, inside a triangle, with a zvalue evaluated by a quintic polynomium
71  \param grid is a pointer to a grid object
72  \param triid is the triangle identification number
73  \param p3da is a pointer to a Point3d object, vector with 3D samples (not used in this method)
74  \param flin and llin are the first and the last lines (rows) of the grid
75  \param fcol and lcol are the first and the last columns of the grid
76  \param zvalue is the z value to be stored in the grid inside the triangle region
77  \return TRUE always
78  */
79  bool FillGridQuintic(int32_t triid, int32_t flin, int32_t llin, int32_t fcol, int32_t lcol, double *coef);
80 
82  std::string m_inDsetName;
83  std::unique_ptr<te::da::DataSetType> m_inDsetType;
84 
85  std::map<std::string, std::string> m_dsinfo;
86 
88  };
89  }
90 }
91 
92 #endif
Tin.h
This file contains a class to define a TIN. Adapted from SPRING.
te
TerraLib.
Definition: AddressGeocodingOp.h:52
te::mnt::TINCalculateGrid::FillGridLinear
bool FillGridLinear(int32_t triid, te::gm::Point *p3da, int32_t flin, int32_t llin, int32_t fcol, int32_t lcol)
te::mnt::Tin
Class to define TIN strutures.
Definition: Tin.h:277
te::mnt::TINCalculateGrid::m_inDsetName
std::string m_inDsetName
Definition: TINCalculateGrid.h:82
te::mnt::TINCalculateGrid::TINCalculateGrid
TINCalculateGrid()
Definition: TINCalculateGrid.h:38
te::mnt::TINCalculateGrid::run
bool run()
te::mnt::TINCalculateGrid::FillGridQuintic
bool FillGridQuintic(int32_t triid, int32_t flin, int32_t llin, int32_t fcol, int32_t lcol, double *coef)
Method that fills the grid locations, inside a triangle, with a zvalue evaluated by a quintic polynom...
te::mnt::TINCalculateGrid::m_inDsetType
std::unique_ptr< te::da::DataSetType > m_inDsetType
Definition: TINCalculateGrid.h:83
te::mnt::TINCalculateGrid::m_gridtype
Interpolator m_gridtype
Definition: TINCalculateGrid.h:87
te::mnt::TINCalculateGrid
Class to calculate grid from TIN.
Definition: TINCalculateGrid.h:36
te::mnt::TINCalculateGrid::m_dsinfo
std::map< std::string, std::string > m_dsinfo
Definition: TINCalculateGrid.h:85
te::mnt::TINCalculateGrid::m_inDsrc
te::da::DataSourcePtr m_inDsrc
Definition: TINCalculateGrid.h:81
te::mnt::Interpolator
Interpolator
Definition: Enums.h:55
te::mnt::TINCalculateGrid::setInput
void setInput(te::da::DataSourcePtr inDsrc, std::string inDsetName, std::unique_ptr< te::da::DataSetType > inDsetType)
It sets the Datasource that is being used to generate TIN.
te::da::DataSourcePtr
boost::shared_ptr< DataSource > DataSourcePtr
Definition: DataSource.h:1449
Config.h
Proxy configuration file for TerraView (see terraview_config.h).
te::mnt::TINCalculateGrid::setOutput
void setOutput(std::map< std::string, std::string > &dsinfo)
It sets the Datasource that is being used to save TIN.
te::mnt::TINCalculateGrid::setParams
void setParams(double resx, double resy, Interpolator gt)
It sets the parameters that is being used to save TIN.
te::mnt::TINCalculateGrid::~TINCalculateGrid
~TINCalculateGrid()
TEMNTEXPORT
#define TEMNTEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:41
te::gm::Point
A point with x and y coordinate values.
Definition: Point.h:51