Loading...
Searching...
No Matches
SecondDegreePolynomialGT.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/SecondDegreePolynomialGT.h
22
23 \brief Second Degree Polynomial Geometric transformation.
24*/
25
26#ifndef __TERRALIB_GEOMETRY_INTERNAL_SECONDDEGREEPOLYNOMIALGT_H
27#define __TERRALIB_GEOMETRY_INTERNAL_SECONDDEGREEPOLYNOMIALGT_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
37namespace te
38{
39 namespace gm
40 {
41 /*!
42 \class SecondDegreePolynomialGT
43
44 \brief Second Degree Polynomial Geometric transformation.
45 */
47 {
48 public:
49
50 /*! \brief Default constructor. */
52
53 /*! \brief Destructor. */
55
56 const std::string& getName() const;
57
58 bool isValid( const GTParameters& params ) const;
59
60 void directMap( const GTParameters& params, const double& pt1X,
61 const double& pt1Y, double& pt2X, double& pt2Y ) const;
62
63 void inverseMap( const GTParameters& params, const double& pt2X,
64 const double& pt2Y, double& pt1X, double& pt1Y ) const;
65
66 unsigned int getMinRequiredTiePoints() const;
67
69
70 protected:
71
72 // Variables used by the method computeParameters
74 mutable unsigned int m_computeParameters_tpIdx;
75 mutable boost::numeric::ublas::matrix< double > m_computeParameters_W;
76 mutable boost::numeric::ublas::matrix< double > m_computeParameters_WI;
77 mutable boost::numeric::ublas::matrix< double > m_computeParameters_X;
78 mutable boost::numeric::ublas::matrix< double > m_computeParameters_XI;
79 mutable boost::numeric::ublas::matrix< double > m_computeParameters_Y;
80 mutable boost::numeric::ublas::matrix< double > m_computeParameters_YI;
81 mutable boost::numeric::ublas::matrix< double > m_computeParameters_PinvW;
82 mutable boost::numeric::ublas::matrix< double > m_computeParameters_PinvWI;
83 mutable boost::numeric::ublas::matrix< double > m_computeParameters_A;
84 mutable boost::numeric::ublas::matrix< double > m_computeParameters_AI;
85 mutable boost::numeric::ublas::matrix< double > m_computeParameters_B;
86 mutable boost::numeric::ublas::matrix< double > m_computeParameters_BI;
87
88 bool computeParameters( GTParameters& params ) const;
89 };
90
91 } // end namespace gm
92} // end namespace te
93
94#endif // __TERRALIB_GEOMETRY_INTERNAL_SECONDDEGREEPOLYNOMIALGT_H
95
2D Geometric transformation base class.
2D Geometric transformation parameters.
Definition: GTParameters.h:51
2D Geometric transformation base class.
Second Degree Polynomial Geometric transformation.
void directMap(const GTParameters &params, const double &pt1X, const double &pt1Y, double &pt2X, double &pt2Y) const
Direct mapping (from pt1 space into pt2 space).
boost::numeric::ublas::matrix< double > m_computeParameters_WI
boost::numeric::ublas::matrix< double > m_computeParameters_W
boost::numeric::ublas::matrix< double > m_computeParameters_XI
SecondDegreePolynomialGT()
Default constructor.
boost::numeric::ublas::matrix< double > m_computeParameters_B
boost::numeric::ublas::matrix< double > m_computeParameters_A
boost::numeric::ublas::matrix< double > m_computeParameters_X
boost::numeric::ublas::matrix< double > m_computeParameters_PinvW
const std::string & getName() const
Returns the current transformation name.
unsigned int getMinRequiredTiePoints() const
Returns the minimum number of required tie-points for the current transformation.
boost::numeric::ublas::matrix< double > m_computeParameters_PinvWI
void inverseMap(const GTParameters &params, const double &pt2X, const double &pt2Y, double &pt1X, double &pt1Y) const
Inverse mapping (from pt2 space into pt1 space).
boost::numeric::ublas::matrix< double > m_computeParameters_Y
boost::numeric::ublas::matrix< double > m_computeParameters_BI
bool computeParameters(GTParameters &params) const
Calculate the transformation parameters following the new supplied tie-points.
GeometricTransformation * clone() const
Creat a clone copy of this instance.
boost::numeric::ublas::matrix< double > m_computeParameters_AI
boost::numeric::ublas::matrix< double > m_computeParameters_YI
bool isValid(const GTParameters &params) const
Verifies if the supplied parameters already has a valid transformation.
TerraLib.
#define TEGEOMEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:76
Proxy configuration file for TerraView (see terraview_config.h).