21 #ifndef otbMetadataDataHelper_h
22 #define otbMetadataDataHelper_h
24 #include "OTBMetadataExport.h"
30 #include <unordered_map>
78 std::unordered_map<std::string, std::vector<double>>
LUTs;
137 const std::string & prefix,
138 const std::string & name,
139 std::vector<T> & dest)
143 std::vector<std::string> mdStr;
145 bool hasValue =
false;
150 mdStr.push_back(value);
158 value = mds.
GetMetadataValue(prefix +
"_" + std::to_string(i) +
"." + name, hasValue);
160 mdStr.push_back(value);
168 <<
"Missing metadata '"<< prefix + name <<
"'")
171 for (
const auto & elem : mdStr)
175 dest.push_back(boost::lexical_cast<T>(elem));
177 catch (boost::bad_lexical_cast&)
189 const std::string & prefix,
190 const std::string & name,
191 std::vector<T> & dest,
192 std::vector<T> & defaultValue)
197 std::vector<std::string> mdStr;
199 bool hasValue =
false;
204 mdStr.push_back(value);
212 value = mds.
GetMetadataValue(prefix +
"_" + std::to_string(i) +
"." + name, hasValue);
214 mdStr.push_back(value);
224 for (
const auto & elem : mdStr)
228 dest.push_back(boost::lexical_cast<T>(elem));
230 catch (boost::bad_lexical_cast&)
239 const std::string & prefix,
240 const std::string & name)
242 std::vector<T> vector;
243 ParseVector(mds, prefix, name, vector);
251 return d.GetSecond() + 60.0 * (
252 d.GetMinute() + 60.0 * (
253 d.GetHour() + 24.0 * (
254 d.GetDay() - 1.0 + 365.25 * (
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
#define otbGenericExceptionMacro(T, x)
Struct containing metadata parsed from a Dimap product.
std::vector< double > PhysicalGain
std::vector< double > AcrossTrackViewingAngle
std::vector< double > SolarIrradiance
std::string ProcessingLevel
std::unordered_map< std::string, std::vector< double > > LUTs
std::string AcquisitionDate
std::vector< double > PhysicalBias
std::vector< double > AlongTrackViewingAngle
std::string SwathFirstCol
std::vector< std::string > LUTFileNames
std::vector< double > SunElevation
std::vector< double > SceneOrientation
std::vector< double > AlongTrackIncidenceAngle
std::vector< double > RangeMin
std::vector< double > RangeMax
std::vector< double > IncidenceAngle
std::string ProductionDate
std::string SpectralProcessing
std::string softwareVersion
std::string InstrumentIndex
std::vector< double > AzimuthAngle
std::vector< double > ViewingAngle
std::vector< double > AcrossTrackIncidenceAngle
std::string TimeRangeStart
std::vector< double > SunAzimuth
std::vector< std::string > BandIDs
Spot5 sensors parameters.