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 
41 namespace 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. */
62  GTParameters();
63 
64  /*! \brief Copy constructor. */
65  GTParameters( const GTParameters& rhs );
66 
67  /*! \brief Destructor. */
68  ~GTParameters();
69 
70  te::common::AbstractParameters* clone() const;
71 
72  void reset() throw( te::common::Exception );
73 
74  GTParameters& operator=( const GTParameters& rhs );
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  */
81  const GTModelParameters* getModelParameters() const
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::auto_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 
virtual AbstractParameters * clone() const =0
Create a clone copy of this instance.
Base exception class for plugin module.
Definition: Exception.h:42
std::vector< double > m_directParameters
Transformation numeric direct parameters.
Definition: GTParameters.h:100
std::pair< Coord2D, Coord2D > TiePoint
Tie point type definition.
Definition: GTParameters.h:59
#define TEGEOMEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:76
URI C++ Library.
Abstract parameters base interface.
std::auto_ptr< GTModelParameters > m_modelParameters
Transformation model parameters.
Definition: GTParameters.h:105
2D Geometric transformation model parameters.
std::vector< double > m_inverseParameters
Transformation numeric inverse parameters.
Definition: GTParameters.h:101
2D Geometric transformation parameters.
Definition: GTParameters.h:50
void setModelParameters(const GTModelParameters *modelParamsPtr)
Set the the internal specific model parameters.
Definition: GTParameters.h:91
2D Geometric transformation model parameters.
Configuration flags for the Vector Geometry Model of TerraLib.
An utility struct for representing 2D coordinates.