Loading...
Searching...
No Matches
TranslationGT.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/TranslationGT.h
22
23 \brief 2D translation (X,Y) Geometric transformation.
24*/
25
26#ifndef __TERRALIB_GEOMETRY_INTERNAL_TRANSLATIONGT_H
27#define __TERRALIB_GEOMETRY_INTERNAL_TRANSLATIONGT_H
28
29// TerraLib
30#include "Config.h"
32
33namespace te
34{
35 namespace gm
36 {
37 /*!
38 \class TranslationGT
39
40 \brief 2D translation(X,Y) Geometric transformation.
41
42 \note The transformation parameters (inside GTParameters::m_directParameters) are disposed on the following form:
43
44 \code
45 u = x + a
46 v = y + b
47
48 GTParameters::m_directParameters = [ a b ]
49 \endcode
50 */
52 {
53 public:
54
55 /*! \brief Default constructor. */
57
58 /*! \brief Destructor. */
60
61 const std::string& getName() const;
62
63 bool isValid( const GTParameters& params ) const;
64
65 void directMap( const GTParameters& params, const double& pt1X,
66 const double& pt1Y, double& pt2X, double& pt2Y ) const;
67
68 void inverseMap( const GTParameters& params, const double& pt2X,
69 const double& pt2Y, double& pt1X, double& pt1Y ) const;
70
71 unsigned int getMinRequiredTiePoints() const;
72
74
75 protected:
76
77 // variables used by computeParameters
79 mutable std::size_t m_computeParameters_tpIdx;
84
85 bool computeParameters( GTParameters& params ) const;
86 };
87
88 } // end namespace gm
89} // end namespace te
90
91#endif // __TERRALIB_GEOMETRY_INTERNAL_TRANSLATIONGT_H
92
2D Geometric transformation base class.
2D Geometric transformation parameters.
2D Geometric transformation base class.
2D translation(X,Y) Geometric transformation.
void inverseMap(const GTParameters &params, const double &pt2X, const double &pt2Y, double &pt1X, double &pt1Y) const
Inverse mapping (from pt2 space into pt1 space).
bool isValid(const GTParameters &params) const
Verifies if the supplied parameters already has a valid transformation.
TranslationGT()
Default constructor.
unsigned int getMinRequiredTiePoints() const
Returns the minimum number of required tie-points for the current transformation.
double m_computeParameters_meanDiffY
bool computeParameters(GTParameters &params) const
Calculate the transformation parameters following the new supplied tie-points.
const std::string & getName() const
Returns the current transformation name.
void directMap(const GTParameters &params, const double &pt1X, const double &pt1Y, double &pt2X, double &pt2Y) const
Direct mapping (from pt1 space into pt2 space).
~TranslationGT()
Destructor.
std::size_t m_computeParameters_tiepointsSize
double m_computeParameters_meanDiffX
std::size_t m_computeParameters_tpIdx
GeometricTransformation * clone() const
Creat a clone copy of this instance.
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).