21 #ifndef otbMetadataDataHelper_h
22 #define otbMetadataDataHelper_h
24 #include "OTBMetadataExport.h"
119 const std::string & prefix,
120 const std::string & name,
121 std::vector<T> & dest)
125 std::vector<std::string> mdStr;
127 bool hasValue =
false;
132 mdStr.push_back(value);
140 value = mds.
GetMetadataValue(prefix +
"_" + std::to_string(i) +
"." + name, hasValue);
142 mdStr.push_back(value);
150 <<
"Missing metadata '"<< prefix + name <<
"'")
153 for (
const auto & elem : mdStr)
157 dest.push_back(boost::lexical_cast<T>(elem));
159 catch (boost::bad_lexical_cast&)
171 const std::string & prefix,
172 const std::string & name,
173 std::vector<T> & dest,
174 std::vector<T> & defaultValue)
179 std::vector<std::string> mdStr;
181 bool hasValue =
false;
186 mdStr.push_back(value);
194 value = mds.
GetMetadataValue(prefix +
"_" + std::to_string(i) +
"." + name, hasValue);
196 mdStr.push_back(value);
206 for (
const auto & elem : mdStr)
210 dest.push_back(boost::lexical_cast<T>(elem));
212 catch (boost::bad_lexical_cast&)
221 const std::string & prefix,
222 const std::string & name)
224 std::vector<T> vector;
225 ParseVector(mds, prefix, name, vector);
233 return d.GetSecond() + 60.0 * (
234 d.GetMinute() + 60.0 * (
235 d.GetHour() + 24.0 * (
236 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::string AcquisitionDate
std::vector< double > PhysicalBias
std::vector< double > AlongTrackViewingAngle
std::string SwathFirstCol
std::vector< double > SunElevation
std::vector< double > SceneOrientation
std::vector< double > AlongTrackIncidenceAngle
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.