OTB  9.0.0
Orfeo Toolbox
otbImageToOSMVectorDataGenerator.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 otbImageToOSMVectorDataGenerator_h
22 #define otbImageToOSMVectorDataGenerator_h
23 
25 
26 namespace otb
27 {
28 
43 template <class TImage>
45 {
46 public:
50  typedef itk::SmartPointer<Self> Pointer;
51  typedef itk::SmartPointer<const Self> ConstPointer;
52 
55 
57  itkNewMacro(Self);
58 
59  // Image typedef
60  typedef TImage ImageType;
61  typedef typename ImageType::SizeType SizeType;
62  typedef typename ImageType::IndexType IndexType;
63  typedef typename ImageType::PointType PointType;
64 
65  // VectorData
67 
68  // Struct to store the extent of the image
70  {
71  double minX;
72  double maxX;
73  double minY;
74  double maxY;
75  };
76 
78  using Superclass::SetInput;
79  void SetInput(const ImageType* input);
80 
82  const ImageType* GetInput() const;
83 
84 protected:
85  void GenerateData() override;
86 
87  // Method to compute the extent of the image
88  void EstimateImageExtent();
89 
92  {
93  }
94 
95 private:
96  ImageToOSMVectorDataGenerator(const Self&) = delete;
97  void operator=(const Self&) = delete;
98 
100 
101 }; // end of class
102 
103 } // end of namespace otb
104 
105 #ifndef OTB_MANUAL_INSTANTIATION
107 #endif
108 
109 #endif
otb::ImageToOSMVectorDataGenerator::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbImageToOSMVectorDataGenerator.h:50
otb::ImageToOSMVectorDataGenerator::ImageToOSMVectorDataGenerator
ImageToOSMVectorDataGenerator()
Definition: otbImageToOSMVectorDataGenerator.hxx:33
otb::ImageToOSMVectorDataGenerator::ImageExtentType::maxX
double maxX
Definition: otbImageToOSMVectorDataGenerator.h:72
otb::ImageToOSMVectorDataGenerator::GetInput
const ImageType * GetInput() const
Definition: otbImageToOSMVectorDataGenerator.hxx:53
otb::ImageToOSMVectorDataGenerator::m_ImageExtent
ImageExtentType m_ImageExtent
Definition: otbImageToOSMVectorDataGenerator.h:99
otb::VectorData
This class represents a hierarchy of vector data.
Definition: otbVectorData.h:58
otb::ImageToOSMVectorDataGenerator::ImageType
TImage ImageType
Definition: otbImageToOSMVectorDataGenerator.h:57
otb::ImageToOSMVectorDataGenerator
Helper class to compute the extent of the input image and use it to fill the bbox for the OSM request...
Definition: otbImageToOSMVectorDataGenerator.h:44
otb::ImageToOSMVectorDataGenerator::PointType
ImageType::PointType PointType
Definition: otbImageToOSMVectorDataGenerator.h:63
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::ImageToOSMVectorDataGenerator::Superclass
OSMDataToVectorDataGenerator Superclass
Definition: otbImageToOSMVectorDataGenerator.h:49
otb::ImageToOSMVectorDataGenerator::VectorDataType
Superclass::VectorDataType VectorDataType
Definition: otbImageToOSMVectorDataGenerator.h:66
otb::ImageToOSMVectorDataGenerator::operator=
void operator=(const Self &)=delete
otb::ImageToOSMVectorDataGenerator::GenerateData
void GenerateData() override
Definition: otbImageToOSMVectorDataGenerator.hxx:65
otb::ImageToOSMVectorDataGenerator::Self
ImageToOSMVectorDataGenerator Self
Definition: otbImageToOSMVectorDataGenerator.h:48
otb::ImageToOSMVectorDataGenerator::ImageExtentType
Definition: otbImageToOSMVectorDataGenerator.h:69
otb::ImageToOSMVectorDataGenerator::EstimateImageExtent
void EstimateImageExtent()
Definition: otbImageToOSMVectorDataGenerator.hxx:79
otb::ImageToOSMVectorDataGenerator::SetInput
void SetInput(const ImageType *input)
Definition: otbImageToOSMVectorDataGenerator.hxx:45
otb::ImageToOSMVectorDataGenerator::ImageExtentType::minY
double minY
Definition: otbImageToOSMVectorDataGenerator.h:73
otbOSMDataToVectorDataGenerator.h
otb::ImageToOSMVectorDataGenerator::~ImageToOSMVectorDataGenerator
~ImageToOSMVectorDataGenerator() override
Definition: otbImageToOSMVectorDataGenerator.h:91
otb::ImageToOSMVectorDataGenerator::SizeType
ImageType::SizeType SizeType
Definition: otbImageToOSMVectorDataGenerator.h:61
otb::ImageToOSMVectorDataGenerator::ImageExtentType::maxY
double maxY
Definition: otbImageToOSMVectorDataGenerator.h:74
otbImageToOSMVectorDataGenerator.hxx
otb::ImageToOSMVectorDataGenerator::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbImageToOSMVectorDataGenerator.h:51
otb::ImageToOSMVectorDataGenerator::ImageExtentType::minX
double minX
Definition: otbImageToOSMVectorDataGenerator.h:71
otb::ImageToOSMVectorDataGenerator::IndexType
ImageType::IndexType IndexType
Definition: otbImageToOSMVectorDataGenerator.h:62
otb::OSMDataToVectorDataGenerator
Request OSM Server using the OSM API 0.6 to get the xml file storing the vector elements available.
Definition: otbOSMDataToVectorDataGenerator.h:78