OTB  6.7.0
Orfeo Toolbox
otbImageToOSMVectorDataGenerator.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2019 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 
42 template < class TImage>
45 {
46 public:
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  double minX;
71  double maxX;
72  double minY;
73  double maxY;
74  };
75 
78  void SetInput( const ImageType * input);
79 
81  const ImageType* GetInput() const;
82 
83 protected:
84  void GenerateData() override;
85 
86  // Method to compute the extent of the image
87  void EstimateImageExtent();
88 
91 
92 private:
93  ImageToOSMVectorDataGenerator(const Self&) = delete;
94  void operator=(const Self&) = delete;
95 
97 
98 }; // end of class
99 
100 } // end of namespace otb
101 
102 #ifndef OTB_MANUAL_INSTANTIATION
104 #endif
105 
106 #endif
itk::Size< Monteverdi_DIMENSION > SizeType
Definition: mvdTypes.h:137
Superclass::OutputVectorDataType VectorDataType
itk::Index< Monteverdi_DIMENSION > IndexType
Definition: mvdTypes.h:133
Request OSM Server using the OSM API 0.6 to get the xml file storing the vector elements available...
virtual void SetInput(const DataObjectIdentifierType &key, DataObject *input)
VectorImageType::PointType PointType
Definition: mvdTypes.h:189
void operator=(const Self &)=delete
Helper class to compute the extent of the input image and use it to fill the bbox for the OSM request...