ThirdDegreePolynomialGT.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/geometry/ThirdDegreePolynomialGT.h
22 
23  \brief Third Degree Polynomial Geometric transformation.
24 */
25 
26 #ifndef __TERRALIB_GEOMETRY_INTERNAL_THIRDDEGREEPOLYNOMIALGT_H
27 #define __TERRALIB_GEOMETRY_INTERNAL_THIRDDEGREEPOLYNOMIALGT_H
28 
29 // TerraLib
30 #include "Config.h"
32 
33 // Boost
34 #include <boost/concept_check.hpp>
35 #include <boost/numeric/ublas/matrix.hpp>
36 
37 namespace te
38 {
39  namespace gm
40  {
41  /*!
42  \class ThirdDegreePolynomialGT
43 
44  \brief Third Degree Polynomial Geometric transformation.
45 
46  \note The transformation parameters (inside GTParameters::m_directParameters) are disposed on the following form:
47 
48  \code
49  u = a.x"0.y"0 + b.x"1*y"0 + c.x"0.y"1 + d.x"2.y"0 + e.x"1.y"1 + f.x"0.y"2 + g.x"3.y"0 + h.x"2.y"1 + i.x"1.y"2 + j.x"0.y"3
50  v = k.x"0.y"0 + l.x"1*y"0 + m.x"0.y"1 + n.x"2.y"0 + o.x"1.y"1 + p.x"0.y"2 + q.x"3.y"0 + r.x"2.y"1 + s.x"1.y"2 + t.x"0.y"3
51 
52  GTParameters::m_directParameters = [ a b c d e f g h i j k l m n o p q r s t]
53  \endcode
54  */
56  {
57  public:
58 
59  /*! \brief Default constructor. */
61 
62  /*! \brief Destructor. */
64 
65  const std::string& getName() const;
66 
67  bool isValid( const GTParameters& params ) const;
68 
69  void directMap( const GTParameters& params, const double& pt1X,
70  const double& pt1Y, double& pt2X, double& pt2Y ) const;
71 
72  void inverseMap( const GTParameters& params, const double& pt2X,
73  const double& pt2Y, double& pt1X, double& pt1Y ) const;
74 
75  unsigned int getMinRequiredTiePoints() const;
76 
77  GeometricTransformation* clone() const;
78 
79  protected:
80 
81  // Variables used by computeParameters
82  mutable unsigned int m_computeParameters_tiepointsSize;
83  mutable unsigned int m_computeParameters_tpIdx;
84  mutable boost::numeric::ublas::matrix< double > m_computeParameters_W;
85  mutable boost::numeric::ublas::matrix< double > m_computeParameters_WI;
86  mutable boost::numeric::ublas::matrix< double > m_computeParameters_X;
87  mutable boost::numeric::ublas::matrix< double > m_computeParameters_XI;
88  mutable boost::numeric::ublas::matrix< double > m_computeParameters_Y;
89  mutable boost::numeric::ublas::matrix< double > m_computeParameters_YI;
90  mutable boost::numeric::ublas::matrix< double > m_computeParameters_PinvW;
91  mutable boost::numeric::ublas::matrix< double > m_computeParameters_PinvWI;
92  mutable boost::numeric::ublas::matrix< double > m_computeParameters_A;
93  mutable boost::numeric::ublas::matrix< double > m_computeParameters_AI;
94  mutable boost::numeric::ublas::matrix< double > m_computeParameters_B;
95  mutable boost::numeric::ublas::matrix< double > m_computeParameters_BI;
96 
97  bool computeParameters( GTParameters& params ) const;
98  };
99 
100  } // end namespace gm
101 } // end namespace te
102 
103 #endif // __TERRALIB_GEOMETRY_INTERNAL_THIRDDEGREEPOLYNOMIALGT_H
104 
boost::numeric::ublas::matrix< double > m_computeParameters_X
2D Geometric transformation base class.
Third Degree Polynomial Geometric transformation.
boost::numeric::ublas::matrix< double > m_computeParameters_YI
2D Geometric transformation base class.
boost::numeric::ublas::matrix< double > m_computeParameters_A
#define TEGEOMEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:76
boost::numeric::ublas::matrix< double > m_computeParameters_PinvW
boost::numeric::ublas::matrix< double > m_computeParameters_AI
boost::numeric::ublas::matrix< double > m_computeParameters_Y
URI C++ Library.
boost::numeric::ublas::matrix< double > m_computeParameters_PinvWI
boost::numeric::ublas::matrix< double > m_computeParameters_BI
boost::numeric::ublas::matrix< double > m_computeParameters_WI
2D Geometric transformation parameters.
Definition: GTParameters.h:50
Configuration flags for the Vector Geometry Model of TerraLib.
boost::numeric::ublas::matrix< double > m_computeParameters_B
boost::numeric::ublas::matrix< double > m_computeParameters_XI
boost::numeric::ublas::matrix< double > m_computeParameters_W