OTB  10.0.0
Orfeo Toolbox
otbOGRExtendedFilenameToOptions.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2024 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 
87 
88  bool SimpleFileNameIsSet() const;
89  bool HasGDALLayerOption() const;
90 
92  void SetGDALLayerOptions(const GDALOptionType& options);
93 
95  void AddGDALLayerOptions(const GDALOptionType& options);
96 
101 
102 protected:
106 
107 private:
109  void operator=(const Self&) = delete;
110 
115 };
116 
117 } // end namespace otb
118 
119 #endif // otbOGRExtendedFilenameToOptions_h
Helper to handle extended filenames.
itk::SmartPointer< Self > Pointer
This class aim at processing GDAL option that can be pass through extended filename.
GDALOptionType GetGDALLayerOptions() const
static Pointer GetGDALLayerOptionsHelper(const GDALOptionType &options)
GDALOptionType GetGDALOpenOptions() const
GDALOptionType GetGDALCreationOptions() const
void SetExtendedFileName(const std::string &extFname) override
OptionMapType::const_iterator ConstMapIteratorType
void SetExtendedFileName(const char *extFname) override
OGRExtendedFilenameToOptions(const Self &)=delete
void operator=(const Self &)=delete
void AddGDALLayerOptions(const GDALOptionType &options)
itk::SmartPointer< const Self > ConstPointer
void SetGDALLayerOptions(const GDALOptionType &options)
OGRExtendedFilenameToOptions(const GDALOptionType &options)
GDALOptionType GetGDALOptions(const std::string &type) const
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
std::unordered_map< std::string, std::string > gdalOptions