All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ProjectiveGT.h
Go to the documentation of this file.
1 /* Copyright (C) 2008-2013 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/ProjectiveGT.h
22 
23  \brief 2D Projective Geometric transformation.
24 */
25 
26 #ifndef __TERRALIB_GEOMETRY_INTERNAL_PROJECTIVEGT_H
27 #define __TERRALIB_GEOMETRY_INTERNAL_PROJECTIVEGT_H
28 
29 // TerraLib
30 #include "Config.h"
32 
33 // Boost
34 #include <boost/concept_check.hpp>
35 
36 namespace te
37 {
38  namespace gm
39  {
40  /*!
41  \class ProjectiveGT
42 
43  \brief 2D Projective Geometric transformation.
44 
45  \note The transformation parameters (inside GTParameters::m_directParameters) are disposed on the following form:
46 
47  \code
48  | u | | a b c | * | x |
49  | v | = | d e f | | y |
50  | 1 | | g h 1 | | 1 |
51 
52  u = a.x + b.y + c
53  -------------------
54  g.x + h.y + 1
55 
56  v = d.x + e.y + f
57  -------------------
58  g.x + h.y + 1
59 
60  |u0| |x0 y0 1 0 0 0 -x0*u0 -y0*v0|.|a|
61  |v0| |0 0 0 x0 y0 1 -x0*v0 -y0*v0| |b|
62  |u1| |...................................| |c|
63  |v1| = |...................................| |d|
64  |..| |...................................| |e|
65  |..| |...................................| |f|
66  |..| |...................................| |g|
67  |..| |...................................| |h|
68 
69  GTParameters::m_directParameters = [ a b c d e f g h ]
70  \endcode
71  */
73  {
74  public:
75 
76  /*! \brief Default constructor. */
77  ProjectiveGT();
78 
79  /*! \brief Destructor. */
80  ~ProjectiveGT();
81 
82  const std::string& getName() const;
83 
84  bool isValid( const GTParameters& params ) const;
85 
86  void directMap( const GTParameters& params, const double& pt1X,
87  const double& pt1Y, double& pt2X, double& pt2Y ) const;
88 
89  void inverseMap( const GTParameters& params, const double& pt2X,
90  const double& pt2Y, double& pt1X, double& pt1Y ) const;
91 
92  unsigned int getMinRequiredTiePoints() const;
93 
94  GeometricTransformation* clone() const;
95 
96  protected:
97 
98  bool computeParameters( GTParameters& params ) const;
99  };
100 
101  } // end namespace gm
102 } // end namespace te
103 
104 #endif // __TERRALIB_GEOMETRY_INTERNAL_PROJECTIVEGT_H
105 
#define TEGEOMEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:114
Configuration flags for the Vector Geometry Model of TerraLib.
2D Geometric transformation base class.
2D Geometric transformation parameters.
Definition: GTParameters.h:50
2D Geometric transformation base class.
2D Projective Geometric transformation.
Definition: ProjectiveGT.h:72