OTB  9.0.0
Orfeo Toolbox
otbOGRExtendedFilenameToOptions.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2022 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 otbOGRExtendedFilenameToOptions_h
22 #define otbOGRExtendedFilenameToOptions_h
23 
24 #include <unordered_map>
26 
27 namespace otb
28 {
29 
37 #include "OTBGdalAdaptersExport.h"
38 
39 class OTBGdalAdapters_EXPORT OGRExtendedFilenameToOptions : public ExtendedFilenameHelper
40 {
41 public:
44  typedef itk::SmartPointer<Self> Pointer;
45  typedef itk::SmartPointer<const Self> ConstPointer;
47 
48  typedef Superclass::OptionMapType OptionMapType;
49  typedef OptionMapType::const_iterator ConstMapIteratorType;
50  typedef std::vector<std::string> GDALOptionType;
51 
53  itkNewMacro(Self);
54 
55 
58  {
60  // std::unordered_map< std::string , bool > availableOptions;
61  };
62 
64  {
66  // std::unordered_map< std::string , bool > availableOptions;
67  };
68 
70  {
71  std::unordered_map<std::string, std::string> gdalOptions;
72  };
73 
75  void SetExtendedFileName(const char* extFname) override;
76 
77  void SetExtendedFileName(const std::string& extFname) override;
78 
80  GDALOptionType GetGDALOptions(const std::string& type) const;
81 
83  GDALOptionType GetGDALOpenOptions() const;
84  GDALOptionType GetGDALCreationOptions() const;
85  GDALOptionType GetGDALLayerOptions() const;
87 
88  bool SimpleFileNameIsSet() const;
89  bool HasGDALLayerOption() const;
90 
92  void SetGDALLayerOptions(const GDALOptionType& options);
93 
95  void AddGDALLayerOptions(const GDALOptionType& options);
96 
100  static Pointer GetGDALLayerOptionsHelper(const GDALOptionType& options);
101 
102 protected:
106 
107 private:
108  OGRExtendedFilenameToOptions(const Self&) = delete;
109  void operator=(const Self&) = delete;
110 
115 };
116 
117 } // end namespace otb
118 
119 #endif // otbOGRExtendedFilenameToOptions_h
otb::OGRExtendedFilenameToOptions
This class aim at processing GDAL option that can be pass through extended filename.
Definition: otbOGRExtendedFilenameToOptions.h:39
otb::OGRExtendedFilenameToOptions::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbOGRExtendedFilenameToOptions.h:45
otb::OGRExtendedFilenameToOptions::ConstMapIteratorType
OptionMapType::const_iterator ConstMapIteratorType
Definition: otbOGRExtendedFilenameToOptions.h:49
otb::OGRExtendedFilenameToOptions::~OGRExtendedFilenameToOptions
~OGRExtendedFilenameToOptions() override
Definition: otbOGRExtendedFilenameToOptions.h:105
otb::OGRExtendedFilenameToOptions::OpenOptionType
Definition: otbOGRExtendedFilenameToOptions.h:57
otb::OGRExtendedFilenameToOptions::m_HasFileName
bool m_HasFileName
Definition: otbOGRExtendedFilenameToOptions.h:114
otb::OGRExtendedFilenameToOptions::GDALOptionType
std::vector< std::string > GDALOptionType
Definition: otbOGRExtendedFilenameToOptions.h:50
otb::OGRExtendedFilenameToOptions::m_OpenOptions
OpenOptionType m_OpenOptions
Definition: otbOGRExtendedFilenameToOptions.h:111
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::OGRExtendedFilenameToOptions::OpenOptionType::gdalOptions
GDALOptionType gdalOptions
Definition: otbOGRExtendedFilenameToOptions.h:59
otb::OGRExtendedFilenameToOptions::Self
OGRExtendedFilenameToOptions Self
Definition: otbOGRExtendedFilenameToOptions.h:43
otb::ExtendedFilenameHelper
Helper to handle extended filenames.
Definition: otbExtendedFilenameHelper.h:44
otb::OGRExtendedFilenameToOptions::LayerOptionType::gdalOptions
std::unordered_map< std::string, std::string > gdalOptions
Definition: otbOGRExtendedFilenameToOptions.h:71
otb::OGRExtendedFilenameToOptions::m_LayerOptions
LayerOptionType m_LayerOptions
Definition: otbOGRExtendedFilenameToOptions.h:113
otbExtendedFilenameHelper.h
otb::OGRExtendedFilenameToOptions::OptionMapType
Superclass::OptionMapType OptionMapType
Definition: otbOGRExtendedFilenameToOptions.h:48
otb::OGRExtendedFilenameToOptions::m_CreationOptions
CreationOptionType m_CreationOptions
Definition: otbOGRExtendedFilenameToOptions.h:112
otb::OGRExtendedFilenameToOptions::Superclass
ExtendedFilenameHelper Superclass
Definition: otbOGRExtendedFilenameToOptions.h:46
otb::OGRExtendedFilenameToOptions::LayerOptionType
Definition: otbOGRExtendedFilenameToOptions.h:69
otb::OGRExtendedFilenameToOptions::CreationOptionType
Definition: otbOGRExtendedFilenameToOptions.h:63
otb::ExtendedFilenameHelper::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbExtendedFilenameHelper.h:49
otb::OGRExtendedFilenameToOptions::CreationOptionType::gdalOptions
GDALOptionType gdalOptions
Definition: otbOGRExtendedFilenameToOptions.h:65
otb::OGRExtendedFilenameToOptions::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbOGRExtendedFilenameToOptions.h:44