OTB  6.7.0
Orfeo Toolbox
otbWorldFile.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2019 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 otbWorldFile_h
22 #define otbWorldFile_h
23 
24 #include <iomanip>
25 
26 #include "itkObject.h"
27 #include "itkObjectFactory.h"
28 #include "OTBCartoExport.h"
29 #include <string>
30 
31 namespace otb {
32 
44 class OTBCarto_EXPORT WorldFile : public itk::Object
45 {
46 public:
47 
48  typedef WorldFile Self;
52 
54  itkNewMacro(Self);
55 
56  itkGetMacro(LonOrigin, double);
57  itkSetMacro(LonOrigin, double);
58  itkGetMacro(LatOrigin, double);
59  itkSetMacro(LatOrigin, double);
60  itkGetMacro(LonSpacing, double);
61  itkSetMacro(LonSpacing, double);
62  itkGetMacro(LatSpacing, double);
63  itkSetMacro(LatSpacing, double);
64  itkGetMacro(LonRotation, double);
65  itkSetMacro(LonRotation, double);
66  itkGetMacro(LatRotation, double);
67  itkSetMacro(LatRotation, double);
68 
69  itkGetStringMacro(ImageFilename);
70  itkSetStringMacro(ImageFilename);
71 
72  void Update();
73 
74 protected:
75  WorldFile() : m_LonOrigin(0.0), m_LatOrigin(0.0),
76  m_LonSpacing(0.0), m_LatSpacing(0.0),
77  m_LonRotation(0.0), m_LatRotation(0.0),
78  m_ImageFilename("") {}
79  ~WorldFile() override {}
80 
81 private:
82  WorldFile(const Self &) = delete;
83  void operator =(const Self&) = delete;
84  double m_LonOrigin;
85  double m_LatOrigin;
86  double m_LonSpacing;
87  double m_LatSpacing;
88  double m_LonRotation;
89  double m_LatRotation;
90  std::string m_ImageFilename;
91 };
92 } // end namespace otb
93 
94 #endif
itk::SmartPointer< const Self > ConstPointer
Definition: otbWorldFile.h:51
itk::Object Superclass
Definition: otbWorldFile.h:49
double m_LonSpacing
Definition: otbWorldFile.h:86
~WorldFile() override
Definition: otbWorldFile.h:79
std::string m_ImageFilename
Definition: otbWorldFile.h:90
double m_LonRotation
Definition: otbWorldFile.h:88
double m_LatRotation
Definition: otbWorldFile.h:89
WorldFile Self
Definition: otbWorldFile.h:48
double m_LonOrigin
Definition: otbWorldFile.h:84
itk::SmartPointer< Self > Pointer
Definition: otbWorldFile.h:50
Handles the world file that associates geographic information to png, jpg.
Definition: otbWorldFile.h:44
double m_LatOrigin
Definition: otbWorldFile.h:85
double m_LatSpacing
Definition: otbWorldFile.h:87