Commit f92221a0 authored by Julien Osman's avatar Julien Osman

ENH: Implement various optimizations

Remove unused commented code.
Rename OTB_xxx from otbGeometryMetadata to simply xxx.
Optimize constructors for otbGeometryMetadata::GCP.
Use reference to MetadataSupplierInterface instead of pointer in
ImageMetadataInterfaceBase::Fetch.
Use keyword 'using' in place of 'typedef' in GDALImageMetadataInterface.
parent 1655ef07
Pipeline #5513 failed with stages
in 22 minutes and 13 seconds
......@@ -20,38 +20,6 @@
#include "otbStringUtilities.h"
//~ #if defined(HAVE_STD_SNPRINTF)
//~ # include <cstdio>
//~ #elif defined(HAVE_MSC_SNPRINTF)
//~ # include <stdio.h>
//~ #else
//~ # error "Don't know how to perform snprintf"
//~ #endif
//~
//~ int otb::vs_printf(char * str, std::size_t size, const char * format, std::va_list ap)
//~ {
//~ #if defined(HAVE_STD_SNPRINTF)
//~ const int res = std::vsnprintf(str, size, format, ap);
//~ return res;
//~ #elif defined(HAVE_MSC_SNPRINTF)
//~ const int res = _vsnprintf(str, size, format, ap);
//~ // force 0x0 on the last possible character at worst
//~ str[size-1] = '\0';
//~ return res;
//~ #else
//~ # error "Don't know how to perform snprintf"
//~ #endif
//~ }
//~
//~ int otb::s_printf(char *str, std::size_t size, const char *format, ...)
//~ {
//~ std::va_list ap;
//~ va_start(ap, format);
//~ const int res = ossimplugins::vs_printf(str, size, format, ap);
//~ va_end(ap);
//~ return res;
//~ }
namespace otb
{
......
......@@ -51,9 +51,9 @@ public:
unsigned int GetGCPCount(void) const;
// Removed non-const getter on GCPs
//~ OTB_GCP& GetGCPs(unsigned int GCPnum);
//~ GCP& GetGCPs(unsigned int GCPnum);
const OTB_GCP& GetGCPs(unsigned int GCPnum) const;
const GCP& GetGCPs(unsigned int GCPnum) const;
std::string GetGCPId(unsigned int GCPnum) const;
std::string GetGCPInfo(unsigned int GCPnum) const;
......
......@@ -72,7 +72,7 @@ unsigned int ImageCommons::GetGCPCount(void) const
}
const OTB_GCP& ImageCommons::GetGCPs(unsigned int GCPnum) const
const GCP& ImageCommons::GetGCPs(unsigned int GCPnum) const
{
assert(GCPnum < GetGCPCount());
return m_Imd.GetGCPParam().GCPs[GCPnum];
......
......@@ -32,15 +32,15 @@
namespace otb
{
/** \class OTB_GCP
/** \class GCP
*
* \brief This OTB_GCP class is used to manage the GCP parameters
* \brief This GCP class is used to manage the GCP parameters
* in OTB.
*
*
* \ingroup OTBMetadata
*/
class OTBMetadata_EXPORT OTB_GCP
class OTBMetadata_EXPORT GCP
{
public:
/** Unique identifier, often numeric */
......@@ -64,20 +64,19 @@ public:
/** Elevation of GCP, or zero if not known */
double m_GCPZ;
OTB_GCP();
OTB_GCP(std::string id, std::string info, double col, double row, double px, double py, double pz);
~OTB_GCP();
GCP() = default;
GCP(std::string id, std::string info, double col, double row, double px, double py, double pz);
void Print(std::ostream& os) const;
std::string ToJSON(bool multiline=false) const;
};
/** \struct OTB_azimuthFmRate
/** \struct AzimuthFmRate
*
* \brief This class is used to manage parameters
* \brief This structure is used to manage parameters
* related to the Azimuth Frequency Modulation rate
*/
struct OTBMetadata_EXPORT OTB_azimuthFmRate
struct OTBMetadata_EXPORT AzimuthFmRate
{
/** Zero Doppler azimuth time to which azimuth FM rate parameters apply */
MetaData::Time azimuthTime;
......@@ -87,11 +86,11 @@ struct OTBMetadata_EXPORT OTB_azimuthFmRate
std::vector<double> azimuthFmRatePolynomial;
};
/** \struct OTB_calibrationVector
/** \struct CalibrationVector
*
* \brief This class is used to handle calibration look up tables
* \brief This structure is used to handle calibration look up tables
*/
struct OTBMetadata_EXPORT OTB_calibrationVector
struct OTBMetadata_EXPORT CalibrationVector
{
/** Image line at which the calibration vector applies */
int line;
......@@ -107,11 +106,11 @@ struct OTBMetadata_EXPORT OTB_calibrationVector
MetaData::LUT1D dn;
};
/** \struct OTB_dopplerCentroid
/** \struct DopplerCentroid
*
* \brief This class is used to handle Doppler centroid estimates
* \brief This structure is used to handle Doppler centroid estimates
*/
struct OTBMetadata_EXPORT OTB_dopplerCentroid
struct OTBMetadata_EXPORT DopplerCentroid
{
/** Zero Doppler azimuth time of this Doppler centroid estimate */
MetaData::Time azimuthTime;
......@@ -123,11 +122,11 @@ struct OTBMetadata_EXPORT OTB_dopplerCentroid
std::vector<double> geoDopCoef;
};
/** \struct OTB_SARNoise
/** \struct SARNoise
*
* \breif This class is used to handle Noise look up tables
* \breif This structure is used to handle Noise look up tables
*/
struct OTBMetadata_EXPORT OTB_SARNoise
struct OTBMetadata_EXPORT SARNoise
{
/** Image line at which the noise vector applies */
int line;
......@@ -137,11 +136,11 @@ struct OTBMetadata_EXPORT OTB_SARNoise
MetaData::LUT1D noiseLut;
};
/** \struct OTB_Orbit
/** \struct Orbit
*
* \breif This class is used to handle orbit information
* \breif This structure is used to handle orbit information
*/
struct OTBMetadata_EXPORT OTB_Orbit
struct OTBMetadata_EXPORT Orbit
{
/** Timestamp at which orbit state vectors apply */
MetaData::Time time;
......@@ -166,7 +165,7 @@ struct OTBMetadata_EXPORT GCPParam
{
std::string GCPProjection;
std::vector<OTB_GCP> GCPs;
std::vector<GCP> GCPs;
// JSON export
std::string ToJSON(bool multiline=false) const;
......@@ -260,22 +259,22 @@ struct OTBMetadata_EXPORT SARParam
/** Azimuth Frequency Modulation (FM) rate list.
* contains an entry for each azimuth FM rate update made along azimuth.
*/
std::vector<OTB_azimuthFmRate> azimuthFmRate;
std::vector<AzimuthFmRate> azimuthFmRates;
/** Calibration vector list */
std::vector<OTB_calibrationVector> calibrationVectors;
std::vector<CalibrationVector> calibrationVectors;
MetaData::Time calibrationStartTime;
MetaData::Time calibrationStopTime;
/** Doppler centroid estimates */
std::vector<OTB_dopplerCentroid> dopplerCentroid;
std::vector<DopplerCentroid> dopplerCentroids;
/** Noise look up tables */
std::vector<OTB_SARNoise> noiseVector;
std::vector<SARNoise> noiseVector;
/** List of orbit information */
std::vector<OTB_Orbit> orbits;
std::vector<Orbit> orbits;
};
} // end namespace Projection
......
......@@ -86,8 +86,8 @@ public:
UnsignedIntType GetGCPCount() const;
// otbMetadataGetMacro(GCPCount, unsigned int);
OTB_GCP& GetGCPs(unsigned int GCPnum);
// otbMetadataGetGCPnumMacro(GCPs, OTB_GCP&, GCPnum, unsigned int);
GCP& GetGCPs(unsigned int GCPnum);
// otbMetadataGetGCPnumMacro(GCPs, GCP&, GCPnum, unsigned int);
std::string GetGCPId(unsigned int GCPnum) const;
// otbMetadataGetGCPnumMacro(GCPId, std::string, GCPnum, unsigned int);
......@@ -237,15 +237,15 @@ public:
static void PrintMetadata(std::ostream& os, itk::Indent indent, const MetaDataDictionaryType& dict);
const std::string& Fetch(MDStr key, const MetadataSupplierInterface * mds, const char *path, int band=-1);
const std::string& Fetch(MDStr key, const MetadataSupplierInterface & mds, const char *path, int band=-1);
const double& Fetch(MDNum key, const MetadataSupplierInterface * mds, const char *path, int band=-1);
const double& Fetch(MDNum key, const MetadataSupplierInterface & mds, const char *path, int band=-1);
const MetaData::Time& Fetch(MDTime key, const MetadataSupplierInterface * mds, const char *path, int band=-1);
const MetaData::Time& Fetch(MDTime key, const MetadataSupplierInterface & mds, const char *path, int band=-1);
const std::string& Fetch(std::string key, const MetadataSupplierInterface * mds, const char *path, int band=-1);
const std::string& Fetch(std::string key, const MetadataSupplierInterface & mds, const char *path, int band=-1);
const boost::any& FetchRPC(const MetadataSupplierInterface * mds);
const boost::any& FetchRPC(const MetadataSupplierInterface & mds);
/** Reads into the MetaDataDictionary to find an OSSIM ImageKeywordlist,
* then translate it into ImageMetadata.
......@@ -268,7 +268,7 @@ private:
ImageMetadataInterfaceBase(const Self&) = delete;
void operator=(const Self&) = delete;
OTB_GCP m_GCP;
GCP m_GCP;
};
} // end namespace otb
......
......@@ -88,7 +88,7 @@ enum KeyType
TSTRING,
TENTIER,
TDOUBLE,
TOTB_GCP,
TGCP,
TVECTOR,
TOSSIMKEYWORDLIST,
TVECTORDATAKEYWORDLIST,
......
......@@ -36,10 +36,6 @@ namespace otb
class MissingMetadataException : public itk::ExceptionObject
{
public:
/** Run-time information. */
itkTypeMacro(MissingMetadataException, itk::ExceptionObject);
/** Constructor. */
using itk::ExceptionObject::ExceptionObject;
};
......
......@@ -111,19 +111,19 @@ protected:
}
/* Fetch the AzimuthFmRate metadata */
std::vector<OTB_azimuthFmRate> GetAzimuthFmRate(const XMLMetadataSupplier&) const;
std::vector<AzimuthFmRate> GetAzimuthFmRate(const XMLMetadataSupplier&) const;
/* Fetch the DopplerCentroid metadata */
std::vector<OTB_dopplerCentroid> GetDopplerCentroid(const XMLMetadataSupplier&) const;
std::vector<DopplerCentroid> GetDopplerCentroid(const XMLMetadataSupplier&) const;
/* Fetch the Orbits metadata */
std::vector<OTB_Orbit> GetOrbits(const XMLMetadataSupplier&) const;
std::vector<Orbit> GetOrbits(const XMLMetadataSupplier&) const;
/* Fetch the Calibration metadata */
std::vector<OTB_calibrationVector> GetCalibrationVector(const XMLMetadataSupplier&) const;
std::vector<CalibrationVector> GetCalibrationVector(const XMLMetadataSupplier&) const;
/* Fetch the noise LUTs */
std::vector<OTB_SARNoise> GetNoiseVector(const XMLMetadataSupplier&) const;
std::vector<SARNoise> GetNoiseVector(const XMLMetadataSupplier&) const;
/* Compute the mean terrain elevation */
double getBandTerrainHeight(const XMLMetadataSupplier&) const;
......
......@@ -25,20 +25,12 @@
namespace otb
{
OTB_GCP::OTB_GCP() : m_GCPCol(0), m_GCPRow(0), m_GCPX(0), m_GCPY(0), m_GCPZ(0)
GCP::GCP(std::string id, std::string info, double col, double row, double px, double py, double pz)
: m_Id(move(id)), m_Info(move(info)), m_GCPCol(col), m_GCPRow(row), m_GCPX(px), m_GCPY(py), m_GCPZ(pz)
{
}
OTB_GCP::OTB_GCP(std::string id, std::string info, double col, double row, double px, double py, double pz)
: m_Id(id), m_Info(info), m_GCPCol(col), m_GCPRow(row), m_GCPX(px), m_GCPY(py), m_GCPZ(pz)
{
}
OTB_GCP::~OTB_GCP()
{
}
void OTB_GCP::Print(std::ostream& os) const
void GCP::Print(std::ostream& os) const
{
os << " GCP Id = " << this->m_Id << std::endl;
os << " GCP Info = " << this->m_Info << std::endl;
......@@ -46,7 +38,7 @@ void OTB_GCP::Print(std::ostream& os) const
os << " GCP (X, Y, Z) = (" << this->m_GCPX << "," << this->m_GCPY << "," << this->m_GCPZ << ")" << std::endl;
}
std::string OTB_GCP::ToJSON(bool multiline) const
std::string GCP::ToJSON(bool multiline) const
{
std::ostringstream oss;
std::string sep;
......
......@@ -107,7 +107,7 @@ unsigned int ImageMetadataInterfaceBase::GetGCPCount() const
return (GCPCount);
}
OTB_GCP& ImageMetadataInterfaceBase::GetGCPs(unsigned int GCPnum)
GCP& ImageMetadataInterfaceBase::GetGCPs(unsigned int GCPnum)
{
std::string key;
const MetaDataDictionaryType& dict = this->GetMetaDataDictionary();
......@@ -119,7 +119,7 @@ OTB_GCP& ImageMetadataInterfaceBase::GetGCPs(unsigned int GCPnum)
if (dict.HasKey(key))
{
itk::ExposeMetaData<OTB_GCP>(dict, key, m_GCP);
itk::ExposeMetaData<GCP>(dict, key, m_GCP);
}
return (m_GCP);
}
......@@ -135,8 +135,8 @@ std::string ImageMetadataInterfaceBase::GetGCPId(unsigned int GCPnum) const
if (dict.HasKey(key))
{
OTB_GCP gcp;
itk::ExposeMetaData<OTB_GCP>(dict, key, gcp);
GCP gcp;
itk::ExposeMetaData<GCP>(dict, key, gcp);
return (gcp.m_Id);
}
else
......@@ -154,8 +154,8 @@ std::string ImageMetadataInterfaceBase::GetGCPInfo(unsigned int GCPnum) const
if (dict.HasKey(key))
{
OTB_GCP gcp;
itk::ExposeMetaData<OTB_GCP>(dict, key, gcp);
GCP gcp;
itk::ExposeMetaData<GCP>(dict, key, gcp);
return (gcp.m_Info);
}
else
......@@ -173,8 +173,8 @@ double ImageMetadataInterfaceBase::GetGCPRow(unsigned int GCPnum) const
if (dict.HasKey(key))
{
OTB_GCP gcp;
itk::ExposeMetaData<OTB_GCP>(dict, key, gcp);
GCP gcp;
itk::ExposeMetaData<GCP>(dict, key, gcp);
return (gcp.m_GCPRow);
}
else
......@@ -192,8 +192,8 @@ double ImageMetadataInterfaceBase::GetGCPCol(unsigned int GCPnum) const
if (dict.HasKey(key))
{
OTB_GCP gcp;
itk::ExposeMetaData<OTB_GCP>(dict, key, gcp);
GCP gcp;
itk::ExposeMetaData<GCP>(dict, key, gcp);
return (gcp.m_GCPCol);
}
else
......@@ -211,8 +211,8 @@ double ImageMetadataInterfaceBase::GetGCPX(unsigned int GCPnum) const
if (dict.HasKey(key))
{
OTB_GCP gcp;
itk::ExposeMetaData<OTB_GCP>(dict, key, gcp);
GCP gcp;
itk::ExposeMetaData<GCP>(dict, key, gcp);
return (gcp.m_GCPX);
}
else
......@@ -230,8 +230,8 @@ double ImageMetadataInterfaceBase::GetGCPY(unsigned int GCPnum) const
if (dict.HasKey(key))
{
OTB_GCP gcp;
itk::ExposeMetaData<OTB_GCP>(dict, key, gcp);
GCP gcp;
itk::ExposeMetaData<GCP>(dict, key, gcp);
return (gcp.m_GCPY);
}
else
......@@ -249,8 +249,8 @@ double ImageMetadataInterfaceBase::GetGCPZ(unsigned int GCPnum) const
if (dict.HasKey(key))
{
OTB_GCP gcp;
itk::ExposeMetaData<OTB_GCP>(dict, key, gcp);
GCP gcp;
itk::ExposeMetaData<GCP>(dict, key, gcp);
return (gcp.m_GCPZ);
}
else
......@@ -531,10 +531,10 @@ void ImageMetadataInterfaceBase::PrintMetadata(std::ostream& os, itk::Indent ind
break;
}
case MetaDataKey::TOTB_GCP:
case MetaDataKey::TGCP:
{
OTB_GCP gcpvalue;
itk::ExposeMetaData<OTB_GCP>(dict2, keys[itkey], gcpvalue);
GCP gcpvalue;
itk::ExposeMetaData<GCP>(dict2, keys[itkey], gcpvalue);
os << indent << "---> " << keys[itkey] << std::endl;
gcpvalue.Print(os);
......@@ -623,99 +623,99 @@ void ImageMetadataInterfaceBase::PrintSelf(std::ostream& os, itk::Indent indent)
const std::string&
ImageMetadataInterfaceBase::Fetch(
MDStr key,
const MetadataSupplierInterface * mds,
const MetadataSupplierInterface & mds,
const char *path,
int band)
{
if (band >= 0)
{
assert( (size_t)(band) < m_Imd.Bands.size());
m_Imd.Bands[band].Add(key, mds->GetAs<std::string>(path, band));
m_Imd.Bands[band].Add(key, mds.GetAs<std::string>(path, band));
return m_Imd.Bands[band][key];
}
m_Imd.Add(key, mds->GetAs<std::string>(path) );
m_Imd.Add(key, mds.GetAs<std::string>(path) );
return m_Imd[key];
}
const double&
ImageMetadataInterfaceBase::Fetch(
MDNum key,
const MetadataSupplierInterface * mds,
const MetadataSupplierInterface & mds,
const char *path,
int band)
{
if (band >= 0)
{
assert( (size_t)(band) < m_Imd.Bands.size());
m_Imd.Bands[band].Add(key, mds->GetAs<double>(path, band));
m_Imd.Bands[band].Add(key, mds.GetAs<double>(path, band));
return m_Imd.Bands[band][key];
}
m_Imd.Add(key, mds->GetAs<double>(path));
m_Imd.Add(key, mds.GetAs<double>(path));
return m_Imd[key];
}
const MetaData::Time&
ImageMetadataInterfaceBase::Fetch(
MDTime key,
const MetadataSupplierInterface * mds,
const MetadataSupplierInterface & mds,
const char *path,
int band)
{
if (band >= 0)
{
assert( (size_t)(band) < m_Imd.Bands.size());
m_Imd.Bands[band].Add(key, mds->GetAs<MetaData::Time>(path, band));
m_Imd.Bands[band].Add(key, mds.GetAs<MetaData::Time>(path, band));
return m_Imd.Bands[band][key];
}
m_Imd.Add(key, mds->GetAs<MetaData::Time>(path));
m_Imd.Add(key, mds.GetAs<MetaData::Time>(path));
return m_Imd[key];
}
const std::string&
ImageMetadataInterfaceBase::Fetch(
std::string key,
const MetadataSupplierInterface * mds,
const MetadataSupplierInterface & mds,
const char *path,
int band)
{
if (band >= 0)
{
assert( (size_t)(band) < m_Imd.Bands.size());
m_Imd.Bands[band].Add(key, mds->GetAs<std::string>(path, band));
m_Imd.Bands[band].Add(key, mds.GetAs<std::string>(path, band));
return m_Imd.Bands[band][key];
}
m_Imd.Add(key, mds->GetAs<std::string>(path) );
m_Imd.Add(key, mds.GetAs<std::string>(path) );
return m_Imd[key];
}
const boost::any& ImageMetadataInterfaceBase::FetchRPC(
const MetadataSupplierInterface * mds)
const MetadataSupplierInterface & mds)
{
Projection::RPCParam rpcStruct;
rpcStruct.LineOffset = mds->GetAs<double>("RPC/LINE_OFF");
rpcStruct.SampleOffset = mds->GetAs<double>("RPC/SAMP_OFF");
rpcStruct.LatOffset = mds->GetAs<double>("RPC/LAT_OFF");
rpcStruct.LonOffset = mds->GetAs<double>("RPC/LONG_OFF");
rpcStruct.HeightOffset = mds->GetAs<double>("RPC/HEIGHT_OFF");
rpcStruct.LineScale = mds->GetAs<double>("RPC/LINE_SCALE");
rpcStruct.SampleScale = mds->GetAs<double>("RPC/SAMP_SCALE");
rpcStruct.LatScale = mds->GetAs<double>("RPC/LAT_SCALE");
rpcStruct.LonScale = mds->GetAs<double>("RPC/LONG_SCALE");
rpcStruct.HeightScale = mds->GetAs<double>("RPC/HEIGHT_SCALE");
rpcStruct.LineOffset = mds.GetAs<double>("RPC/LINE_OFF");
rpcStruct.SampleOffset = mds.GetAs<double>("RPC/SAMP_OFF");
rpcStruct.LatOffset = mds.GetAs<double>("RPC/LAT_OFF");
rpcStruct.LonOffset = mds.GetAs<double>("RPC/LONG_OFF");
rpcStruct.HeightOffset = mds.GetAs<double>("RPC/HEIGHT_OFF");
rpcStruct.LineScale = mds.GetAs<double>("RPC/LINE_SCALE");
rpcStruct.SampleScale = mds.GetAs<double>("RPC/SAMP_SCALE");
rpcStruct.LatScale = mds.GetAs<double>("RPC/LAT_SCALE");
rpcStruct.LonScale = mds.GetAs<double>("RPC/LONG_SCALE");
rpcStruct.HeightScale = mds.GetAs<double>("RPC/HEIGHT_SCALE");
std::vector<double> coeffs(20);
coeffs = mds->GetAsVector<double>("RPC/LINE_NUM_COEFF",' ',20);
coeffs = mds.GetAsVector<double>("RPC/LINE_NUM_COEFF",' ',20);
std::copy(coeffs.begin(), coeffs.end(), rpcStruct.LineNum);
coeffs = mds->GetAsVector<double>("RPC/LINE_DEN_COEFF",' ',20);
coeffs = mds.GetAsVector<double>("RPC/LINE_DEN_COEFF",' ',20);
std::copy(coeffs.begin(), coeffs.end(), rpcStruct.LineDen);
coeffs = mds->GetAsVector<double>("RPC/SAMP_NUM_COEFF",' ',20);
coeffs = mds.GetAsVector<double>("RPC/SAMP_NUM_COEFF",' ',20);
std::copy(coeffs.begin(), coeffs.end(), rpcStruct.SampleNum);
coeffs = mds->GetAsVector<double>("RPC/SAMP_DEN_COEFF",' ',20);
coeffs = mds.GetAsVector<double>("RPC/SAMP_DEN_COEFF",' ',20);
std::copy(coeffs.begin(), coeffs.end(), rpcStruct.SampleDen);
m_Imd.Add(MDGeom::RPC, rpcStruct);
......
......@@ -75,7 +75,7 @@ const MetaDataKey::KeyTypeDef Types[] = {
MetaDataKey::KeyTypeDef(MetaDataKey::DriverLongNameKey, MetaDataKey::TSTRING),
MetaDataKey::KeyTypeDef(MetaDataKey::ProjectionRefKey, MetaDataKey::TSTRING),
MetaDataKey::KeyTypeDef(MetaDataKey::GCPProjectionKey, MetaDataKey::TSTRING),
MetaDataKey::KeyTypeDef(MetaDataKey::GCPParametersKey, MetaDataKey::TOTB_GCP),
MetaDataKey::KeyTypeDef(MetaDataKey::GCPParametersKey, MetaDataKey::TGCP),
MetaDataKey::KeyTypeDef(MetaDataKey::GCPCountKey, MetaDataKey::TENTIER),
MetaDataKey::KeyTypeDef(MetaDataKey::GeoTransformKey, MetaDataKey::TVECTOR),
MetaDataKey::KeyTypeDef(MetaDataKey::MetadataKey, MetaDataKey::TSTRING),
......
......@@ -1761,8 +1761,8 @@ PleiadesImageMetadataInterface::WavelengthSpectralBandVectorType PleiadesImageMe
void PleiadesImageMetadataInterface::Parse(const MetadataSupplierInterface *mds)
{
assert(mds);
Fetch(MDStr::SensorID, mds, "IMD/Dataset_Sources.Source_Identification.Strip_Source.MISSION");
if (strncmp(m_Imd[MDStr::SensorID].c_str(), "PHR", 3) == 0)
Fetch(MDStr::SensorID, *mds, "IMD/Dataset_Sources.Source_Identification.Strip_Source.MISSION");
if (boost::starts_with(m_Imd[MDStr::SensorID], "PHR"))
{
m_Imd.Add(MDStr::Mission, "Pléiades");
}
......@@ -1771,14 +1771,14 @@ void PleiadesImageMetadataInterface::Parse(const MetadataSupplierInterface *mds)
otbGenericExceptionMacro(MissingMetadataException,<<"Sensor ID doesn't start with PHR : '"<<m_Imd[MDStr::SensorID]<<"'")
}
Fetch(MDStr::GeometricLevel, mds, "IMD/Geoposition.Raster_CRS.RASTER_GEOMETRY");
Fetch(MDStr::GeometricLevel, *mds, "IMD/Geoposition.Raster_CRS.RASTER_GEOMETRY");
// get radiometric metadata
// fill RPC model
if (m_Imd[MDStr::GeometricLevel] == "SENSOR")
{
FetchRPC(mds);
FetchRPC(*mds);
}
}
......
......@@ -352,9 +352,9 @@ double Sentinel1ImageMetadataInterface::GetCenterIncidenceAngle() const
return 0;
}
std::vector<OTB_azimuthFmRate> Sentinel1ImageMetadataInterface::GetAzimuthFmRate(const XMLMetadataSupplier &xmlMS) const
std::vector<AzimuthFmRate> Sentinel1ImageMetadataInterface::GetAzimuthFmRate(const XMLMetadataSupplier &xmlMS) const
{
std::vector<OTB_azimuthFmRate> azimuthFmRateVector;
std::vector<AzimuthFmRate> azimuthFmRateVector;
// Number of entries in the vector
int listCount = xmlMS.GetAs<int>("product.generalAnnotation.azimuthFmRateList.count");
<