Loading...
Searching...
No Matches
GTParameters.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/GTParameters.h
22
23 \brief 2D Geometric transformation parameters.
24*/
25
26#ifndef __TERRALIB_GEOMETRY_INTERNAL_GTPARAMETERS_H
27#define __TERRALIB_GEOMETRY_INTERNAL_GTPARAMETERS_H
28
29// TerraLib
30#include "../common/AbstractParameters.h"
31#include "Config.h"
32#include "Coord2D.h"
33#include "GTModelParameters.h"
34
35// STL
36#include <memory>
37#include <string>
38#include <utility>
39#include <vector>
40
41namespace te
42{
43 namespace gm
44 {
45 /*!
46 \class GTParameters
47
48 \brief 2D Geometric transformation parameters.
49 */
51 {
52 public:
53
54 /*!
55 \typedef std::pair< Coord2D, Coord2D > TiePoint
56
57 \brief Tie point type definition.
58 */
59 typedef std::pair< Coord2D, Coord2D > TiePoint;
60
61 /*! \brief Constructor. */
63
64 /*! \brief Copy constructor. */
66
67 /*! \brief Destructor. */
69
71
72 void reset() ;
73
75
76 /*!
77 \brief Returns a pointer the the internal specific model parameters or null if they do not exist.
78
79 \return A pointer the the internal specific model parameters or null if they do not exist.
80 */
82 {
83 return m_modelParameters.get();
84 };
85
86 /*!
87 \brief Set the the internal specific model parameters.
88
89 \param modelParamsPtr The new model specific parameters.
90 */
91 void setModelParameters( const GTModelParameters* modelParamsPtr )
92 {
93 m_modelParameters.reset( modelParamsPtr ?
94 static_cast<GTModelParameters*>(modelParamsPtr->clone()) : 0 );
95 };
96
97 public:
98
99 std::vector< TiePoint > m_tiePoints; //!< Tie points.
100 std::vector< double > m_directParameters; //!< Transformation numeric direct parameters.
101 std::vector< double > m_inverseParameters; //!< Transformation numeric inverse parameters.
102
103 protected:
104
105 std::unique_ptr< GTModelParameters > m_modelParameters; //!< Transformation model parameters.
106 };
107
108 } // end namespace gm
109} // end namespace te
110
111#endif // __TERRALIB_GEOMETRY_INTERNAL_GTPARAMETERS_H
112
An utility struct for representing 2D coordinates.
2D Geometric transformation model parameters.
Abstract parameters base interface.
virtual AbstractParameters * clone() const =0
Create a clone copy of this instance.
2D Geometric transformation model parameters.
2D Geometric transformation parameters.
Definition: GTParameters.h:51
te::common::AbstractParameters * clone() const
Create a clone copy of this instance.
void reset()
Clear all internal allocated resources and reset the parameters instance to its initial state.
std::vector< TiePoint > m_tiePoints
Tie points.
Definition: GTParameters.h:99
std::unique_ptr< GTModelParameters > m_modelParameters
Transformation model parameters.
Definition: GTParameters.h:105
void setModelParameters(const GTModelParameters *modelParamsPtr)
Set the the internal specific model parameters.
Definition: GTParameters.h:91
std::vector< double > m_directParameters
Transformation numeric direct parameters.
Definition: GTParameters.h:100
const GTModelParameters * getModelParameters() const
Returns a pointer the the internal specific model parameters or null if they do not exist.
Definition: GTParameters.h:81
GTParameters & operator=(const GTParameters &rhs)
GTParameters()
Constructor.
std::pair< Coord2D, Coord2D > TiePoint
Tie point type definition.
Definition: GTParameters.h:59
GTParameters(const GTParameters &rhs)
Copy constructor.
~GTParameters()
Destructor.
std::vector< double > m_inverseParameters
Transformation numeric inverse parameters.
Definition: GTParameters.h:101
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).