OTB  6.7.0
Orfeo Toolbox
otbExtendedFilenameToWriterOptions.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2019 Centre National d'Etudes Spatiales (CNES)
3  * Copyright (C) 2018 CS Systemes d'Information (CS SI)
4  *
5  * This file is part of Orfeo Toolbox
6  *
7  * https://www.orfeo-toolbox.org/
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  */
21 
22 #ifndef otbExtendedFilenameToWriterOptions_h
23 #define otbExtendedFilenameToWriterOptions_h
24 
26 #include "otbGDALImageIO.h"
27 #include <string>
28 
29 namespace otb
30 {
31 
48 {
49 public:
55 
57  itkNewMacro(Self);
58 
60  typedef FNameHelperType::OptionMapType MapType;
61  typedef MapType::iterator MapIteratorType;
62 
65 
66 
67  struct OptionType
68  {
69  std::pair< bool, std::string > simpleFileName;
70  std::pair< bool, bool > writeGEOMFile;
71  std::pair< bool, bool > writeRPCTags;
72  std::pair< bool, GDALCOType > gdalCreationOptions;
73  std::pair<bool, std::string> streamingType;
74  std::pair<bool, std::string> streamingSizeMode;
75  std::pair<bool, double> streamingSizeValue;
76  std::pair<bool, std::string> box;
77  std::pair< bool, std::string> bandRange;
78  std::vector<std::string> optionList;
79  };
80 
81  typedef std::pair<int, double> NoDataPairType;
82  typedef std::vector<NoDataPairType> NoDataListType;
85 
87  void SetExtendedFileName(const char* extFname) override;
88 
89  void SetExtendedFileName(const std::string& extFname) override;
90 
91  /* Get Methods */
92  bool SimpleFileNameIsSet () const;
93  bool NoDataValueIsSet () const;
94  bool WriteGEOMFileIsSet () const;
95  bool WriteRPCTagsIsSet() const;
97  return m_NoDataList;
98  }
99 
100  bool GetWriteGEOMFile () const;
101  bool GetWriteRPCTags() const;
102  bool gdalCreationOptionsIsSet () const;
103  GDALCOType GetgdalCreationOptions () const;
104  bool StreamingTypeIsSet () const;
105  std::string GetStreamingType() const;
106  bool StreamingSizeModeIsSet() const;
107  std::string GetStreamingSizeMode() const;
108  bool StreamingSizeValueIsSet() const;
109  double GetStreamingSizeValue() const;
110  std::string GetBandRange () const;
111 
112  bool BoxIsSet() const;
113  std::string GetBox() const;
114 
116  bool BandRangeIsSet () const;
117 
118 protected:
121 
122 private:
123  ExtendedFilenameToWriterOptions(const Self &) = delete;
124  void operator =(const Self&) = delete;
125 
127 
128 };
129 } // end namespace otb
130 
131 #endif // otbExtendedFilenameToWriterOptions_h
std::vector< std::string > GDALCreationOptionsType
Converts an extended filename to writer options.
GDALImageIO::GDALCreationOptionsType GDALCOType
Helper to handle extended filenames.