Orfeo Toolbox  4.0
otbTransMercatorMapProjection.txx
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ORFEO Toolbox
4  Language: C++
5  Date: $Date$
6  Version: $Revision$
7 
8 
9  Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
10  See OTBCopyright.txt for details.
11 
12 
13  This software is distributed WITHOUT ANY WARRANTY; without even
14  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  PURPOSE. See the above copyright notices for more information.
16 
17 =========================================================================*/
18 #ifndef __otbTransMercatorMapProjection_txx
19 #define __otbTransMercatorMapProjection_txx
20 
22 
23 namespace otb
24 {
25 
26 template <TransformDirection::TransformationDirection TTransform>
29 {
30  this->SetWkt("ossimTransMercatorProjection");
31  this->SetParameter("OriginX", "49.83"); //TODO check where this is coming from
32  this->SetParameter("OriginY", "6.16");
33 // FIXME
34 // ossimEllipsoid ellipsoid = *(ossimEllipsoidFactory::instance()->create("WE"));
35 // ossimGpt origin(49.83, 6.16); //TODO check where this is coming from
36 // this->m_MapProjection->setEllipsoid(ellipsoid);
37 // this->m_MapProjection->setOrigin(origin);
38 }
39 
41 template <TransformDirection::TransformationDirection TTransform>
44 {
45 }
46 
48 template <TransformDirection::TransformationDirection TTransform>
50 ::SetFalseEasting(double falseEasting)
51 {
52  this->SetParameter("FalseEasting", Utils::ConvertToString(falseEasting));
53  this->Modified();
54 }
55 
57 template <TransformDirection::TransformationDirection TTransform>
59 ::SetFalseNorthing(double falseNorthing)
60 {
61  this->SetParameter("FalseNorthing", Utils::ConvertToString(falseNorthing));
62  this->Modified();
63 }
64 
66 template <TransformDirection::TransformationDirection TTransform>
68 ::SetScaleFactor(double scaleFactor)
69 {
70  this->SetParameter("ScaleFactor", Utils::ConvertToString(scaleFactor));
71  this->Modified();
72 }
73 
75 template <TransformDirection::TransformationDirection TTransform>
77 ::SetParameters(double falseEasting, double falseNorthing, double scaleFactor)
78 {
79  this->SetParameter("FalseEasting", Utils::ConvertToString(falseEasting));
80  this->SetParameter("FalseNorthing", Utils::ConvertToString(falseNorthing));
81  this->SetParameter("ScaleFactor", Utils::ConvertToString(scaleFactor));
82  this->Modified();
83 }
84 
86 template <TransformDirection::TransformationDirection TTransform>
89 {
90  double scaleFactor = atof(this->GetParameter("ScaleFactor").c_str());
91  return scaleFactor;
92 }
93 
95 template <TransformDirection::TransformationDirection TTransform>
98 {
99  double falseNorthing = atof(this->GetParameter("FalseNorthing").c_str());
100  return falseNorthing;
101 }
102 
104 template <TransformDirection::TransformationDirection TTransform>
107 {
108  double falseEasting = atof(this->GetParameter("FalseEasting").c_str());
109  return falseEasting;
110 }
111 
112 }
113 #endif

Generated at Sat Mar 8 2014 16:22:48 for Orfeo Toolbox with doxygen 1.8.3.1