OTB  9.0.0
Orfeo Toolbox
otbSentinel1ImageMetadataInterface.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 otbSentinel1ImageMetadataInterface_h
22 #define otbSentinel1ImageMetadataInterface_h
23 
25 #include "otbXMLMetadataSupplier.h"
26 
27 namespace otb
28 {
38 {
39 public:
42  typedef itk::SmartPointer<Self> Pointer;
43  typedef itk::SmartPointer<const Self> ConstPointer;
44 
46  itkNewMacro(Self);
47 
48 
51 
52  typedef Superclass::ImageType ImageType;
53  typedef Superclass::MetaDataDictionaryType MetaDataDictionaryType;
56  typedef Superclass::RealType RealType;
57  typedef Superclass::LookupDataPointerType LookupDataPointerType;
58 
59  double GetCenterIncidenceAngle(const MetadataSupplierInterface&) const override;
60 
61  /*get lookup data for calculating backscatter */
62  bool HasCalibrationLookupDataFlag(const MetadataSupplierInterface&) const override;
63  bool CreateCalibrationLookupData(SARCalib&, const ImageMetadata&, const MetadataSupplierInterface&, const bool) const override;
64 
65  /* Read the Sar parameters and GCPs from the annotation xml file, this method can be used
66  to instantiate a otb::SarModel */
67  void ReadSarParamAndGCPs(const XMLMetadataSupplier &,
68  SARParam &,
70 
71  void ParseGdal(ImageMetadata &) override;
72 
73  void ParseGeom(ImageMetadata &) override;
74 
75  void Parse(ImageMetadata &) override;
76 
77 protected:
78  /* class ctor */
80 
81  /* class dtor */
82  ~Sentinel1ImageMetadataInterface() override = default;
83 
84  /* Fetch the AzimuthFmRate metadata */
85  std::vector<AzimuthFmRate> GetAzimuthFmRate(const XMLMetadataSupplier&) const;
86 
87  /* Fetch the DopplerCentroid metadata */
88  std::vector<DopplerCentroid> GetDopplerCentroid(const XMLMetadataSupplier&) const;
89 
90  /* Fetch the Orbits metadata */
91  std::vector<Orbit> GetOrbits(const XMLMetadataSupplier&) const;
92 
93  /* Fetch the burst records */
94  std::vector<BurstRecord> GetBurstRecords(const XMLMetadataSupplier&, const MetaData::Duration & azimuthTimeInterval) const;
95 
96  /* Fetch coordinate conversion records (Sr0/Gr0) */
97  std::vector<CoordinateConversionRecord> GetCoordinateConversionRecord(const XMLMetadataSupplier &xmlMS,
98  const std::string & rg0_path,
99  const std::string & coeffs_path) const;
100 
101  /* Compute the mean terrain elevation */
102  double getBandTerrainHeight(const XMLMetadataSupplier&) const;
103 
104  /* create the thermal denoising LUT */
105  bool CreateThermalNoiseLookupData(SARCalib& sarCalib,
106  const ImageMetadata& imd,
107  const MetadataSupplierInterface& mds,
108  const bool geom) const;
109 
110 private:
111  Sentinel1ImageMetadataInterface(const Self&) = delete;
112  void operator=(const Self&) = delete;
113 };
114 
115 
116 
117 
118 } // end namespace otb
119 
120 #endif
otb::Sentinel1ImageMetadataInterface
Creation of an "otb" Sentinel1ImageMetadataInterface that gets metadata.
Definition: otbSentinel1ImageMetadataInterface.h:37
otb::Sentinel1ImageMetadataInterface::VariableLengthVectorType
Superclass::VariableLengthVectorType VariableLengthVectorType
Definition: otbSentinel1ImageMetadataInterface.h:55
otb::Sentinel1ImageMetadataInterface::MetaDataDictionaryType
Superclass::MetaDataDictionaryType MetaDataDictionaryType
Definition: otbSentinel1ImageMetadataInterface.h:53
otb::Sentinel1ImageMetadataInterface::Self
Sentinel1ImageMetadataInterface Self
Definition: otbSentinel1ImageMetadataInterface.h:40
otb::Sentinel1ImageMetadataInterface::VectorType
Superclass::VectorType VectorType
Definition: otbSentinel1ImageMetadataInterface.h:54
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::MetaDataKey::VectorType
std::vector< double > VectorType
Definition: otbMetaDataKey.h:119
otb::Sentinel1ImageMetadataInterface::RealType
Superclass::RealType RealType
Definition: otbSentinel1ImageMetadataInterface.h:56
otb::Sentinel1ImageMetadataInterface::ImageType
Superclass::ImageType ImageType
Definition: otbSentinel1ImageMetadataInterface.h:50
otb::MetaDataKey::VariableLengthVectorType
itk::VariableLengthVector< double > VariableLengthVectorType
Definition: otbMetaDataKey.h:121
otbXMLMetadataSupplier.h
otb::SARParam
SAR sensors parameters.
Definition: otbSARMetadata.h:211
otb::MetadataSupplierInterface
Base class to access metadata information in files/images.
Definition: otbMetadataSupplierInterface.h:40
otb::Sentinel1ImageMetadataInterface::Superclass
SarImageMetadataInterface Superclass
Definition: otbSentinel1ImageMetadataInterface.h:41
otb::XMLMetadataSupplier
Class to access metadata information in a XML file.
Definition: otbXMLMetadataSupplier.h:41
otb::Sentinel1ImageMetadataInterface::LookupDataPointerType
Superclass::LookupDataPointerType LookupDataPointerType
Definition: otbSentinel1ImageMetadataInterface.h:57
otb::ImageMetadataInterfaceBase
Base class for captor metadata reading.
Definition: otbImageMetadataInterfaceBase.h:44
otb::Sentinel1ImageMetadataInterface::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbSentinel1ImageMetadataInterface.h:43
otb::ImageMetadata
Generic class containing image metadata used in OTB.
Definition: otbImageMetadata.h:270
otb::SARCalib
SAR calibration LUTs.
Definition: otbSARMetadata.h:281
otb::Projection::GCPParam
This structure handles the list of the GCP parameters.
Definition: otbGeometryMetadata.h:88
otb::SarImageMetadataInterface
Class for SAR captor metadata reading.
Definition: otbSarImageMetadataInterface.h:42
otb::Sentinel1ImageMetadataInterface::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbSentinel1ImageMetadataInterface.h:42
otbSarImageMetadataInterface.h
otb::MetaData::Duration
Represents a duration.
Definition: otbDateTime.h:162