All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RSTGT.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/RSTGT.h
22 
23  \brief 2D Rotation/scale/translation (rigid body) Geometric transformation.
24 */
25 
26 #ifndef __TERRALIB_GEOMETRY_INTERNAL_RSTGT_H
27 #define __TERRALIB_GEOMETRY_INTERNAL_RSTGT_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 RSTGT
42 
43  \brief 2D Rotation/scale/translation(rigid body) Geometric transformation.
44 
45  \note The transformation parameters (inside GTParameters::m_directParameters) are disposed on the following form:
46 
47  \code
48  u = a.x - b.y + c
49  v = b.x + a.y + d
50 
51  - | u | = | a -b c | * | x |
52  - | v | | b a d | | y |
53  - | 1 | | 0 0 1 | | 1 |
54 
55  |u0| = |x0 -y0 1 0|.|a|
56  |v0| |y0 x0 0 1| |b|
57  |u1| |x1 -y12 1 0| |c|
58  |v1| |y1 y1 0 1| |d|
59  |..| |.............|
60  |..| |.............|
61 
62  GTParameters::m_directParameters = [ a b c d ]
63  \endcode
64  */
66  {
67  public:
68 
69  /*! \brief Default constructor. */
70  RSTGT();
71 
72  /*! \brief Destructor. */
73  ~RSTGT();
74 
75  const std::string& getName() const;
76 
77  bool isValid( const GTParameters& params ) const;
78 
79  void directMap( const GTParameters& params, const double& pt1X,
80  const double& pt1Y, double& pt2X, double& pt2Y ) const;
81 
82  void inverseMap( const GTParameters& params, const double& pt2X,
83  const double& pt2Y, double& pt1X, double& pt1Y ) const;
84 
85  unsigned int getMinRequiredTiePoints() const;
86 
87  GeometricTransformation* clone() const;
88 
89  protected:
90 
91  bool computeParameters( GTParameters& params ) const;
92  };
93 
94  } // end namespace gm
95 } // end namespace te
96 
97 #endif // __TERRALIB_GEOMETRY_INTERNAL_RSTGT_H
98 
2D Geometric transformation base class.
2D Geometric transformation base class.
#define TEGEOMEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:79
2D Rotation/scale/translation(rigid body) Geometric transformation.
Definition: RSTGT.h:65
2D Geometric transformation parameters.
Definition: GTParameters.h:50
Configuration flags for the Vector Geometry Model of TerraLib.