OTB  7.4.0
Orfeo Toolbox
otbGeocentricTransform.hxx
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2020 Centre National d'Etudes Spatiales (CNES)
3  *
4  * This file is part of Orfeo Toolbox
5  *
6  * https://www.orfeo-toolbox.org/
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20 
21 #ifndef otbGeocentricTransform_hxx
22 #define otbGeocentricTransform_hxx
23 
24 #include "otbGeocentricTransform.h"
25 
26 namespace otb
27 {
28 
29 template <TransformDirection::TransformationDirection TDirectionOfMapping, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
31  : Superclass(ParametersDimension),
32  m_Ellipsoid(EllipsoidAdapter::New())
33 {}
34 
35 template <TransformDirection::TransformationDirection TDirectionOfMapping, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
37 {
38 }
39 
40 template <TransformDirection::TransformationDirection TDirectionOfMapping, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
43 {
44  OutputPointType outputPoint;
45 
47  {
48  m_Ellipsoid->XYZToLonLatHeight(point[0], point[1], point[2], outputPoint[0], outputPoint[1], outputPoint[2]);
49  }
51  {
52  m_Ellipsoid->LonLatHeightToXYZ(point[0], point[1], point[2], outputPoint[0], outputPoint[1], outputPoint[2]);
53  }
54  // To be completed
55  return outputPoint;
56 }
57 
58 } // namespace otb
59 #endif
itk::Point< ScalarType, NOutputDimensions > OutputPointType
static const TransformDirection::TransformationDirection DirectionOfMapping
itk::Point< ScalarType, NInputDimensions > InputPointType
class providing the interface to the ossimEllipsoid
EllipsoidAdapter::Pointer m_Ellipsoid
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
OutputPointType TransformPoint(const InputPointType &point) const override
Class to overload method passed to virtual pure in ITK V4.
Definition: otbTransform.h:39