OTB  9.0.0
Orfeo Toolbox
otbExtendedFilenameToWriterOptions.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2022 Centre National d'Etudes Spatiales (CNES)
3  * Copyright (C) 2018-2020 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 
54 {
55 public:
58  typedef itk::SmartPointer<Self> Pointer;
59  typedef itk::SmartPointer<const Self> ConstPointer;
61 
63  itkNewMacro(Self);
64 
66  typedef FNameHelperType::OptionMapType MapType;
67  typedef MapType::iterator MapIteratorType;
68 
71 
72 
73  struct OptionType
74  {
75  std::pair<bool, std::string> simpleFileName;
76  std::pair<bool, bool> writeGEOMFile;
77  std::pair<bool, bool> writeRPCTags;
78  std::pair<bool, bool> multiWrite;
79  std::pair<bool, GDALCOType> gdalCreationOptions;
80  std::pair<bool, std::string> streamingType;
81  std::pair<bool, std::string> streamingSizeMode;
82  std::pair<bool, double> streamingSizeValue;
83  std::pair<bool, std::string> box;
84  std::pair<bool, std::string> bandRange;
85  std::pair<bool, unsigned int> srsValue;
86  std::vector<std::string> optionList;
87  };
88 
89  typedef std::pair<int, double> NoDataPairType;
90  typedef std::vector<NoDataPairType> NoDataListType;
93 
95  void SetExtendedFileName(const char* extFname) override;
96 
97  void SetExtendedFileName(const std::string& extFname) override;
98 
99  /* Get Methods */
100  bool SimpleFileNameIsSet() const;
101  bool NoDataValueIsSet() const;
102  bool WriteGEOMFileIsSet() const;
103  bool WriteRPCTagsIsSet() const;
104  bool GetMultiWrite() const;
106  {
107  return m_NoDataList;
108  }
109 
110  bool GetWriteGEOMFile() const;
111  bool GetWriteRPCTags() const;
112  bool gdalCreationOptionsIsSet() const;
113  GDALCOType GetgdalCreationOptions() const;
114  bool StreamingTypeIsSet() const;
115  std::string GetStreamingType() const;
116  bool StreamingSizeModeIsSet() const;
117  std::string GetStreamingSizeMode() const;
118  bool StreamingSizeValueIsSet() const;
119  double GetStreamingSizeValue() const;
120  std::string GetBandRange() const;
121  bool SrsValueIsSet() const;
122  unsigned int GetSrsValue() const;
123 
124  bool BoxIsSet() const;
125  std::string GetBox() const;
126 
128  bool BandRangeIsSet() const;
129 
130 protected:
133  {
134  }
135 
136 private:
137  ExtendedFilenameToWriterOptions(const Self&) = delete;
138  void operator=(const Self&) = delete;
139 
141 };
142 } // end namespace otb
143 
144 #endif // otbExtendedFilenameToWriterOptions_h
otb::ExtendedFilenameToWriterOptions::m_Options
OptionType m_Options
Definition: otbExtendedFilenameToWriterOptions.h:140
otb::ExtendedFilenameToWriterOptions::OptionType
Definition: otbExtendedFilenameToWriterOptions.h:73
otb::ExtendedFilenameToWriterOptions::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbExtendedFilenameToWriterOptions.h:58
otb::ExtendedFilenameToWriterOptions::OptionType::streamingType
std::pair< bool, std::string > streamingType
Definition: otbExtendedFilenameToWriterOptions.h:80
otb::ExtendedFilenameToWriterOptions::Self
ExtendedFilenameToWriterOptions Self
Definition: otbExtendedFilenameToWriterOptions.h:57
otb::ExtendedFilenameToWriterOptions::OptionType::srsValue
std::pair< bool, unsigned int > srsValue
Definition: otbExtendedFilenameToWriterOptions.h:85
otb::ExtendedFilenameToWriterOptions::GDALCOType
GDALImageIO::GDALCreationOptionsType GDALCOType
Definition: otbExtendedFilenameToWriterOptions.h:70
otb::ExtendedFilenameToWriterOptions::OptionType::multiWrite
std::pair< bool, bool > multiWrite
Definition: otbExtendedFilenameToWriterOptions.h:78
otb::ExtendedFilenameToWriterOptions::OptionType::streamingSizeValue
std::pair< bool, double > streamingSizeValue
Definition: otbExtendedFilenameToWriterOptions.h:82
otb::ExtendedFilenameToWriterOptions::MapType
FNameHelperType::OptionMapType MapType
Definition: otbExtendedFilenameToWriterOptions.h:66
otb::ExtendedFilenameToWriterOptions::OptionType::box
std::pair< bool, std::string > box
Definition: otbExtendedFilenameToWriterOptions.h:83
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::ExtendedFilenameToWriterOptions::GetNoDataList
NoDataListType GetNoDataList() const
Definition: otbExtendedFilenameToWriterOptions.h:105
otb::ExtendedFilenameToWriterOptions
Converts an extended filename to writer options.
Definition: otbExtendedFilenameToWriterOptions.h:53
otb::ExtendedFilenameHelper::Superclass
itk::Object Superclass
Definition: otbExtendedFilenameHelper.h:51
otb::ExtendedFilenameToWriterOptions::Superclass
ExtendedFilenameHelper Superclass
Definition: otbExtendedFilenameToWriterOptions.h:60
otb::ExtendedFilenameToWriterOptions::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbExtendedFilenameToWriterOptions.h:59
otb::ExtendedFilenameToWriterOptions::MapIteratorType
MapType::iterator MapIteratorType
Definition: otbExtendedFilenameToWriterOptions.h:67
otbGDALImageIO.h
otb::GDALImageIO::GDALCreationOptionsType
std::vector< std::string > GDALCreationOptionsType
Definition: otbGDALImageIO.h:90
otb::ExtendedFilenameToWriterOptions::OptionType::simpleFileName
std::pair< bool, std::string > simpleFileName
Definition: otbExtendedFilenameToWriterOptions.h:75
otb::ExtendedFilenameHelper
Helper to handle extended filenames.
Definition: otbExtendedFilenameHelper.h:44
otbExtendedFilenameHelper.h
otb::ExtendedFilenameToWriterOptions::OptionType::writeRPCTags
std::pair< bool, bool > writeRPCTags
Definition: otbExtendedFilenameToWriterOptions.h:77
otb::ExtendedFilenameToWriterOptions::has_noDataValue
bool has_noDataValue
Definition: otbExtendedFilenameToWriterOptions.h:92
otb::ExtendedFilenameToWriterOptions::~ExtendedFilenameToWriterOptions
~ExtendedFilenameToWriterOptions() override
Definition: otbExtendedFilenameToWriterOptions.h:132
otb::ExtendedFilenameToWriterOptions::NoDataListType
std::vector< NoDataPairType > NoDataListType
Definition: otbExtendedFilenameToWriterOptions.h:90
otb::ExtendedFilenameToWriterOptions::FNameHelperType
Superclass FNameHelperType
Definition: otbExtendedFilenameToWriterOptions.h:63
otb::ExtendedFilenameToWriterOptions::m_NoDataList
NoDataListType m_NoDataList
Definition: otbExtendedFilenameToWriterOptions.h:91
otb::ExtendedFilenameToWriterOptions::OptionType::optionList
std::vector< std::string > optionList
Definition: otbExtendedFilenameToWriterOptions.h:86
otb::ExtendedFilenameToWriterOptions::OptionType::bandRange
std::pair< bool, std::string > bandRange
Definition: otbExtendedFilenameToWriterOptions.h:84
otb::ExtendedFilenameToWriterOptions::NoDataPairType
std::pair< int, double > NoDataPairType
Definition: otbExtendedFilenameToWriterOptions.h:89
otb::ExtendedFilenameToWriterOptions::OptionType::gdalCreationOptions
std::pair< bool, GDALCOType > gdalCreationOptions
Definition: otbExtendedFilenameToWriterOptions.h:79
otb::ExtendedFilenameToWriterOptions::OptionType::writeGEOMFile
std::pair< bool, bool > writeGEOMFile
Definition: otbExtendedFilenameToWriterOptions.h:76
otb::ExtendedFilenameToWriterOptions::OptionType::streamingSizeMode
std::pair< bool, std::string > streamingSizeMode
Definition: otbExtendedFilenameToWriterOptions.h:81