diff --git a/Modules/Core/Common/src/otbStringUtilities.cxx b/Modules/Core/Common/src/otbStringUtilities.cxx index 20e936dfbad59c6e5762a124a6a8862cb79eaaac..dbe3112ac91c9b4a1db510d71dc096c2a2856a4e 100644 --- a/Modules/Core/Common/src/otbStringUtilities.cxx +++ b/Modules/Core/Common/src/otbStringUtilities.cxx @@ -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 { diff --git a/Modules/Core/ImageBase/include/otbImageCommons.h b/Modules/Core/ImageBase/include/otbImageCommons.h index 849eac8830fc3d644ded41162f17a354666182f2..db863ea5bba4c6ccc109b2541ffc4919db923c84 100644 --- a/Modules/Core/ImageBase/include/otbImageCommons.h +++ b/Modules/Core/ImageBase/include/otbImageCommons.h @@ -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; diff --git a/Modules/Core/ImageBase/src/otbImageCommons.cxx b/Modules/Core/ImageBase/src/otbImageCommons.cxx index 4f3788499e440bc021662bd5671aab588499ada4..8923d0ba8ef3c76e756cff435d10b1bcc490434a 100644 --- a/Modules/Core/ImageBase/src/otbImageCommons.cxx +++ b/Modules/Core/ImageBase/src/otbImageCommons.cxx @@ -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]; diff --git a/Modules/Core/Metadata/include/otbGeometryMetadata.h b/Modules/Core/Metadata/include/otbGeometryMetadata.h index fa4b98a060b66e0507efddd1813586be494ea746..f5d3493246a35352d112cbea5405b548789af034 100644 --- a/Modules/Core/Metadata/include/otbGeometryMetadata.h +++ b/Modules/Core/Metadata/include/otbGeometryMetadata.h @@ -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 diff --git a/Modules/Core/Metadata/include/otbImageMetadataInterfaceBase.h b/Modules/Core/Metadata/include/otbImageMetadataInterfaceBase.h index 05fd794b580c2f463a976c9ca97f44391f007406..bc8a4672e7ae100fff6b859bbeb92ee4c52522d2 100644 --- a/Modules/Core/Metadata/include/otbImageMetadataInterfaceBase.h +++ b/Modules/Core/Metadata/include/otbImageMetadataInterfaceBase.h @@ -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 diff --git a/Modules/Core/Metadata/include/otbMetaDataKey.h b/Modules/Core/Metadata/include/otbMetaDataKey.h index bb514951efde843bcd6de2b6b9f752f7ad935b23..88656b521e166ff8b9ac3ed6eb82c91956f36a69 100644 --- a/Modules/Core/Metadata/include/otbMetaDataKey.h +++ b/Modules/Core/Metadata/include/otbMetaDataKey.h @@ -88,7 +88,7 @@ enum KeyType TSTRING, TENTIER, TDOUBLE, - TOTB_GCP, + TGCP, TVECTOR, TOSSIMKEYWORDLIST, TVECTORDATAKEYWORDLIST, diff --git a/Modules/Core/Metadata/include/otbMetadataSupplierInterface.h b/Modules/Core/Metadata/include/otbMetadataSupplierInterface.h index f98272105792fabb1b474430522d70a83f8da1a7..b78599207c2daad1dcb35584cf44d0d5f06e9564 100644 --- a/Modules/Core/Metadata/include/otbMetadataSupplierInterface.h +++ b/Modules/Core/Metadata/include/otbMetadataSupplierInterface.h @@ -36,10 +36,6 @@ namespace otb class MissingMetadataException : public itk::ExceptionObject { public: - /** Run-time information. */ - itkTypeMacro(MissingMetadataException, itk::ExceptionObject); - - /** Constructor. */ using itk::ExceptionObject::ExceptionObject; }; diff --git a/Modules/Core/Metadata/include/otbSentinel1ImageMetadataInterface.h b/Modules/Core/Metadata/include/otbSentinel1ImageMetadataInterface.h index 65bea26e399ca84f156e1c41813d9e0044dce458..9245a3e214aea8d285cf585d47db580ba275342f 100644 --- a/Modules/Core/Metadata/include/otbSentinel1ImageMetadataInterface.h +++ b/Modules/Core/Metadata/include/otbSentinel1ImageMetadataInterface.h @@ -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; diff --git a/Modules/Core/Metadata/src/otbGeometryMetadata.cxx b/Modules/Core/Metadata/src/otbGeometryMetadata.cxx index 9819c07adf2da2c85d696489c768e61aa0aa6c19..0dadc355c40c57bf0575a36db318f76348ca54b9 100644 --- a/Modules/Core/Metadata/src/otbGeometryMetadata.cxx +++ b/Modules/Core/Metadata/src/otbGeometryMetadata.cxx @@ -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; diff --git a/Modules/Core/Metadata/src/otbImageMetadataInterfaceBase.cxx b/Modules/Core/Metadata/src/otbImageMetadataInterfaceBase.cxx index 56410b71c18e2d9d6415fd86916be98affe25e9a..7d662a217eb6c8101c25a4a53406e729e252a935 100644 --- a/Modules/Core/Metadata/src/otbImageMetadataInterfaceBase.cxx +++ b/Modules/Core/Metadata/src/otbImageMetadataInterfaceBase.cxx @@ -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); diff --git a/Modules/Core/Metadata/src/otbMetaDataKey.cxx b/Modules/Core/Metadata/src/otbMetaDataKey.cxx index e9cf4d213749108e146646e51a7186ca82be84e4..db6ec2ac9111cf24fd9783d42e1a445862c8d590 100644 --- a/Modules/Core/Metadata/src/otbMetaDataKey.cxx +++ b/Modules/Core/Metadata/src/otbMetaDataKey.cxx @@ -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), diff --git a/Modules/Core/Metadata/src/otbPleiadesImageMetadataInterface.cxx b/Modules/Core/Metadata/src/otbPleiadesImageMetadataInterface.cxx index ccd2a268053421d234fd1c48b05cfff96db71f01..de511406a91a5ff899e635995d27e3b8010ef96b 100644 --- a/Modules/Core/Metadata/src/otbPleiadesImageMetadataInterface.cxx +++ b/Modules/Core/Metadata/src/otbPleiadesImageMetadataInterface.cxx @@ -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); } } diff --git a/Modules/Core/Metadata/src/otbSentinel1ImageMetadataInterface.cxx b/Modules/Core/Metadata/src/otbSentinel1ImageMetadataInterface.cxx index 0d8d81ffea83f031b82ae309d96abbc6b2b5d492..13fb397bf6022e710bd882c610bb0a3f460e79b6 100644 --- a/Modules/Core/Metadata/src/otbSentinel1ImageMetadataInterface.cxx +++ b/Modules/Core/Metadata/src/otbSentinel1ImageMetadataInterface.cxx @@ -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"); // This streams wild hold the iteration number @@ -365,7 +365,7 @@ std::vector<OTB_azimuthFmRate> Sentinel1ImageMetadataInterface::GetAzimuthFmRate oss << listId; // Base path to the data, that depends on the iteration number std::string path_root = "product.generalAnnotation.azimuthFmRateList.azimuthFmRate_" + oss.str(); - OTB_azimuthFmRate afr; + AzimuthFmRate afr; std::istringstream(xmlMS.GetAs<std::string>(path_root + ".azimuthTime")) >> afr.azimuthTime; afr.t0 = xmlMS.GetAs<double>(path_root + ".t0"); afr.azimuthFmRatePolynomial = xmlMS.GetAsVector<double>(path_root + ".azimuthFmRatePolynomial", @@ -375,9 +375,9 @@ std::vector<OTB_azimuthFmRate> Sentinel1ImageMetadataInterface::GetAzimuthFmRate return azimuthFmRateVector; } -std::vector<OTB_dopplerCentroid> Sentinel1ImageMetadataInterface::GetDopplerCentroid(const XMLMetadataSupplier &xmlMS) const +std::vector<DopplerCentroid> Sentinel1ImageMetadataInterface::GetDopplerCentroid(const XMLMetadataSupplier &xmlMS) const { - std::vector<OTB_dopplerCentroid> dopplerCentroidVector; + std::vector<DopplerCentroid> dopplerCentroidVector; // Number of entries in the vector int listCount = xmlMS.GetAs<int>("product.dopplerCentroid.dcEstimateList.count"); // This streams wild hold the iteration number @@ -388,7 +388,7 @@ std::vector<OTB_dopplerCentroid> Sentinel1ImageMetadataInterface::GetDopplerCent oss << listId; // Base path to the data, that depends on the iteration number std::string path_root = "product.dopplerCentroid.dcEstimateList.dcEstimate_" + oss.str(); - OTB_dopplerCentroid dopplerCent; + DopplerCentroid dopplerCent; std::istringstream(xmlMS.GetAs<std::string>(path_root + ".azimuthTime")) >> dopplerCent.azimuthTime; dopplerCent.t0 = xmlMS.GetAs<double>(path_root + ".t0"); dopplerCent.dopCoef = xmlMS.GetAsVector<double>(path_root + ".dataDcPolynomial", @@ -400,9 +400,9 @@ std::vector<OTB_dopplerCentroid> Sentinel1ImageMetadataInterface::GetDopplerCent return dopplerCentroidVector; } -std::vector<OTB_Orbit> Sentinel1ImageMetadataInterface::GetOrbits(const XMLMetadataSupplier &xmlMS) const +std::vector<Orbit> Sentinel1ImageMetadataInterface::GetOrbits(const XMLMetadataSupplier &xmlMS) const { - std::vector<OTB_Orbit> orbitVector; + std::vector<Orbit> orbitVector; // Number of entries in the vector int listCount = xmlMS.GetAs<int>("product.generalAnnotation.orbitList.count"); // This streams wild hold the iteration number @@ -413,7 +413,7 @@ std::vector<OTB_Orbit> Sentinel1ImageMetadataInterface::GetOrbits(const XMLMetad oss << listId; // Base path to the data, that depends on the iteration number std::string path_root = "product.generalAnnotation.orbitList.orbit_" + oss.str(); - OTB_Orbit orbit; + Orbit orbit; std::istringstream(xmlMS.GetAs<std::string>(path_root + ".time")) >> orbit.time; orbit.posX = xmlMS.GetAs<double>(path_root + ".position.x"); orbit.posY = xmlMS.GetAs<double>(path_root + ".position.y"); @@ -426,9 +426,9 @@ std::vector<OTB_Orbit> Sentinel1ImageMetadataInterface::GetOrbits(const XMLMetad return orbitVector; } -std::vector<OTB_calibrationVector> Sentinel1ImageMetadataInterface::GetCalibrationVector(const XMLMetadataSupplier &xmlMS) const +std::vector<CalibrationVector> Sentinel1ImageMetadataInterface::GetCalibrationVector(const XMLMetadataSupplier &xmlMS) const { - std::vector<OTB_calibrationVector> calibrationVector; + std::vector<CalibrationVector> calibrationVector; // Number of entries in the vector int listCount = xmlMS.GetAs<int>("calibration.calibrationVectorList.count"); // This streams wild hold the iteration number @@ -440,7 +440,7 @@ std::vector<OTB_calibrationVector> Sentinel1ImageMetadataInterface::GetCalibrati // Base path to the data, that depends on the iteration number std::string path_root = "calibration.calibrationVectorList.calibrationVector_" + oss.str(); - OTB_calibrationVector calVect; + CalibrationVector calVect; std::istringstream(xmlMS.GetAs<std::string>(path_root + ".azimuthTime")) >> calVect.azimuthTime; calVect.line = xmlMS.GetAs<int>(path_root + ".line"); @@ -478,9 +478,9 @@ std::vector<OTB_calibrationVector> Sentinel1ImageMetadataInterface::GetCalibrati return calibrationVector; } -std::vector<OTB_SARNoise> Sentinel1ImageMetadataInterface::GetNoiseVector(const XMLMetadataSupplier &xmlMS) const +std::vector<SARNoise> Sentinel1ImageMetadataInterface::GetNoiseVector(const XMLMetadataSupplier &xmlMS) const { - std::vector<OTB_SARNoise> noiseVector; + std::vector<SARNoise> noiseVector; // Number of entries in the vector int listCount = xmlMS.GetAs<int>("noise.noiseVectorList.count"); // This streams wild hold the iteration number @@ -491,7 +491,7 @@ std::vector<OTB_SARNoise> Sentinel1ImageMetadataInterface::GetNoiseVector(const oss << listId; // Base path to the data, that depends on the iteration number std::string path_root = "noise.noiseVectorList.noiseVector_" + oss.str(); - OTB_SARNoise noiseVect; + SARNoise noiseVect; std::istringstream(xmlMS.GetAs<std::string>(path_root + ".azimuthTime")) >> noiseVect.azimuthTime; MetaData::LUT1D noiseLut; MetaData::LUTAxis ax1; @@ -529,21 +529,21 @@ void Sentinel1ImageMetadataInterface::Parse(const MetadataSupplierInterface *mds assert(mds); assert(mds->GetNbBands() == this->m_Imd.Bands.size()); // Metadata read by GDAL - Fetch(MDTime::AcquisitionStartTime, mds, "ACQUISITION_START_TIME"); - Fetch(MDTime::AcquisitionStopTime, mds, "ACQUISITION_STOP_TIME"); - Fetch(MDStr::BeamMode, mds, "BEAM_MODE"); - Fetch(MDStr::BeamSwath, mds, "BEAM_SWATH"); - Fetch("FACILITY_IDENTIFIER", mds, "FACILITY_IDENTIFIER"); - Fetch(MDNum::LineSpacing, mds, "LINE_SPACING"); - Fetch(MDStr::Mission, mds, "MISSION_ID"); - Fetch(MDStr::Mode, mds, "MODE"); - Fetch(MDStr::OrbitDirection, mds, "ORBIT_DIRECTION"); - Fetch(MDNum::OrbitNumber, mds, "ORBIT_NUMBER"); - Fetch(MDNum::PixelSpacing, mds, "PIXEL_SPACING"); - Fetch(MDStr::ProductType, mds, "PRODUCT_TYPE"); - Fetch(MDStr::Instrument, mds, "SATELLITE_IDENTIFIER"); - Fetch(MDStr::SensorID, mds, "SENSOR_IDENTIFIER"); - Fetch(MDStr::Swath, mds, "SWATH"); + Fetch(MDTime::AcquisitionStartTime, *mds, "ACQUISITION_START_TIME"); + Fetch(MDTime::AcquisitionStopTime, *mds, "ACQUISITION_STOP_TIME"); + Fetch(MDStr::BeamMode, *mds, "BEAM_MODE"); + Fetch(MDStr::BeamSwath, *mds, "BEAM_SWATH"); + Fetch("FACILITY_IDENTIFIER", *mds, "FACILITY_IDENTIFIER"); + Fetch(MDNum::LineSpacing, *mds, "LINE_SPACING"); + Fetch(MDStr::Mission, *mds, "MISSION_ID"); + Fetch(MDStr::Mode, *mds, "MODE"); + Fetch(MDStr::OrbitDirection, *mds, "ORBIT_DIRECTION"); + Fetch(MDNum::OrbitNumber, *mds, "ORBIT_NUMBER"); + Fetch(MDNum::PixelSpacing, *mds, "PIXEL_SPACING"); + Fetch(MDStr::ProductType, *mds, "PRODUCT_TYPE"); + Fetch(MDStr::Instrument, *mds, "SATELLITE_IDENTIFIER"); + Fetch(MDStr::SensorID, *mds, "SENSOR_IDENTIFIER"); + Fetch(MDStr::Swath, *mds, "SWATH"); // Manifest file std::string ManifestFilePath = mds->GetResourceFile(std::string("manifest\\.safe")); @@ -560,8 +560,8 @@ void Sentinel1ImageMetadataInterface::Parse(const MetadataSupplierInterface *mds for (int bandId = 0 ; bandId < mds->GetNbBands() ; ++bandId) { Projection::SARParam sarParam; - Fetch(MDStr::Polarization, mds, "POLARISATION", bandId); - std::string swath = Fetch(MDStr::Swath, mds, "SWATH", bandId); + Fetch(MDStr::Polarization, *mds, "POLARISATION", bandId); + std::string swath = Fetch(MDStr::Swath, *mds, "SWATH", bandId); // Annotation file std::string AnnotationFilePath = mds->GetResourceFile(std::string("annotation[/\\\\]s1[ab].*-") @@ -571,8 +571,8 @@ void Sentinel1ImageMetadataInterface::Parse(const MetadataSupplierInterface *mds otbGenericExceptionMacro(MissingMetadataException,<<"Missing Annotation file for band '"<<swath<<"'"); XMLMetadataSupplier AnnotationMS(AnnotationFilePath); - sarParam.azimuthFmRate = this->GetAzimuthFmRate(AnnotationMS); - sarParam.dopplerCentroid = this->GetDopplerCentroid(AnnotationMS); + sarParam.azimuthFmRates = this->GetAzimuthFmRate(AnnotationMS); + sarParam.dopplerCentroids = this->GetDopplerCentroid(AnnotationMS); sarParam.orbits = this->GetOrbits(AnnotationMS); m_Imd.Add(MDNum::NumberOfLines, AnnotationMS.GetAs<int>("product.imageAnnotation.imageInformation.numberOfLines")); m_Imd.Add(MDNum::NumberOfColumns, AnnotationMS.GetAs<int>("product.imageAnnotation.imageInformation.numberOfSamples")); diff --git a/Modules/Core/Metadata/test/otbImageMetadataTest.cxx b/Modules/Core/Metadata/test/otbImageMetadataTest.cxx index e263b1bc27739864ad19e58bfd415dd45bc95508..90c28432d559d4664f2b354de652136cdaed2d67 100644 --- a/Modules/Core/Metadata/test/otbImageMetadataTest.cxx +++ b/Modules/Core/Metadata/test/otbImageMetadataTest.cxx @@ -241,7 +241,7 @@ void otbImageMetadataToFromKeywordlistTest(char* argv[]) Projection::RPCParam rpcStruct; md.Add(MDGeom::RPC, rpcStruct); Projection::GCPParam gcpStruct; - gcpStruct.GCPs.push_back(OTB_GCP()); + gcpStruct.GCPs.push_back(GCP()); md.Add(MDGeom::GCP, gcpStruct); MetaData::LUT1D lut1d; lut1d.Axis[0].Size = 3; diff --git a/Modules/IO/IOGDAL/include/otbGDALImageMetadataInterface.h b/Modules/IO/IOGDAL/include/otbGDALImageMetadataInterface.h index 82ad6528af35019be966a1d134b5dc26a69d2780..9f837b32eb67c72c1139fbca52520c67c3a4af72 100644 --- a/Modules/IO/IOGDAL/include/otbGDALImageMetadataInterface.h +++ b/Modules/IO/IOGDAL/include/otbGDALImageMetadataInterface.h @@ -31,10 +31,10 @@ namespace otb class OTBIOGDAL_EXPORT GDALImageMetadataInterface : public ImageMetadataInterfaceBase { public: - typedef GDALImageMetadataInterface Self; - typedef ImageMetadataInterfaceBase Superclass; - typedef itk::SmartPointer<Self> Pointer; - typedef itk::SmartPointer<const Self> ConstPointer; + using Self = GDALImageMetadataInterface; + using Superclass = ImageMetadataInterfaceBase; + using Pointer = itk::SmartPointer<Self>; + using ConstPointer = itk::SmartPointer<const Self>; /** Method for creation through the object factory. */ itkNewMacro(Self); diff --git a/Modules/IO/IOGDAL/src/otbGDALDatasetWrapper.cxx b/Modules/IO/IOGDAL/src/otbGDALDatasetWrapper.cxx index dea1bba7b9a36573533185a8b86f41a2e83efa3a..bf92492c26bc072656d3248a867de9516174c75b 100644 --- a/Modules/IO/IOGDAL/src/otbGDALDatasetWrapper.cxx +++ b/Modules/IO/IOGDAL/src/otbGDALDatasetWrapper.cxx @@ -157,13 +157,13 @@ Projection::GCPParam GDALDatasetWrapper::GetGCPParam() const gcpParam.GCPProjection = std::string(m_Dataset->GetGCPProjection()); for ( const GDAL_GCP *gcps = m_Dataset->GetGCPs() ; gcps != gcps + m_Dataset->GetGCPCount() ; ++gcps) { - gcpParam.GCPs.push_back(OTB_GCP(std::string(gcps->pszId), - std::string(gcps->pszInfo), - gcps->dfGCPPixel, - gcps->dfGCPLine, - gcps->dfGCPX, - gcps->dfGCPY, - gcps->dfGCPZ)); + gcpParam.GCPs.push_back(GCP(std::string(gcps->pszId), + std::string(gcps->pszInfo), + gcps->dfGCPPixel, + gcps->dfGCPLine, + gcps->dfGCPX, + gcps->dfGCPY, + gcps->dfGCPZ)); } return gcpParam; } diff --git a/Modules/IO/IOGDAL/src/otbGDALImageIO.cxx b/Modules/IO/IOGDAL/src/otbGDALImageIO.cxx index 9344dd7bb0d056c32fbfe2bc0364f780e231cc90..1018f930528afb32bef85acec4ae6ebf39b42956 100644 --- a/Modules/IO/IOGDAL/src/otbGDALImageIO.cxx +++ b/Modules/IO/IOGDAL/src/otbGDALImageIO.cxx @@ -845,7 +845,7 @@ void GDALImageIO::InternalReadImageInformation() const GDAL_GCP* psGCP; psGCP = dataset->GetGCPs() + cpt; - OTB_GCP pOtbGCP; + GCP pOtbGCP; pOtbGCP.m_Id = std::string(psGCP->pszId); pOtbGCP.m_Info = std::string(psGCP->pszInfo); pOtbGCP.m_GCPRow = psGCP->dfGCPLine; @@ -859,7 +859,7 @@ void GDALImageIO::InternalReadImageInformation() lStream << MetaDataKey::GCPParametersKey << cpt; key = lStream.str(); - itk::EncapsulateMetaData<OTB_GCP>(dict, key, pOtbGCP); + itk::EncapsulateMetaData<GCP>(dict, key, pOtbGCP); gcps.GCPs.push_back(pOtbGCP); } m_Imd.Add(MDGeom::GCP, gcps); @@ -1568,7 +1568,7 @@ void GDALImageIO::InternalWriteImageInformation(const void* buffer) std::vector<GDAL_GCP> gdalGcps(gcpPrm.GCPs.size()); for (unsigned int gcpIndex = 0; gcpIndex < gdalGcps.size(); ++gcpIndex) { - const OTB_GCP &gcp = gcpPrm.GCPs[gcpIndex]; + const GCP &gcp = gcpPrm.GCPs[gcpIndex]; gdalGcps[gcpIndex].pszId = const_cast<char*>(gcp.m_Id.c_str()); gdalGcps[gcpIndex].pszInfo = const_cast<char*>(gcp.m_Info.c_str()); diff --git a/Modules/Wrappers/ApplicationEngine/include/otbWrapperMetaDataHelper.h b/Modules/Wrappers/ApplicationEngine/include/otbWrapperMetaDataHelper.h index f21958e796cbc2d4d2f0bb26e6bb9e0d60bfdbde..ce6ec8a7ffbdaff6c9836e9fd7231e0dfc2fea9e 100644 --- a/Modules/Wrappers/ApplicationEngine/include/otbWrapperMetaDataHelper.h +++ b/Modules/Wrappers/ApplicationEngine/include/otbWrapperMetaDataHelper.h @@ -68,8 +68,8 @@ OTBApplicationEngine_EXPORT void SetInt(itk::MetaDataDictionary& dict, const std OTBApplicationEngine_EXPORT double GetDouble(const itk::MetaDataDictionary& dict, const std::string& key); OTBApplicationEngine_EXPORT void SetDouble(itk::MetaDataDictionary& dict, const std::string& key, double val); -OTBApplicationEngine_EXPORT otb::OTB_GCP GetGCP(const itk::MetaDataDictionary& dict, const std::string& key); -OTBApplicationEngine_EXPORT void SetGCP(itk::MetaDataDictionary& dict, const std::string& key, const otb::OTB_GCP& val); +OTBApplicationEngine_EXPORT otb::GCP GetGCP(const itk::MetaDataDictionary& dict, const std::string& key); +OTBApplicationEngine_EXPORT void SetGCP(itk::MetaDataDictionary& dict, const std::string& key, const otb::GCP& val); OTBApplicationEngine_EXPORT otb::MetaDataKey::VectorType GetVector(const itk::MetaDataDictionary& dict, const std::string& key); OTBApplicationEngine_EXPORT void SetVector(itk::MetaDataDictionary& dict, const std::string& key, const otb::MetaDataKey::VectorType& val); diff --git a/Modules/Wrappers/ApplicationEngine/src/otbWrapperMetaDataHelper.cxx b/Modules/Wrappers/ApplicationEngine/src/otbWrapperMetaDataHelper.cxx index e0483c5ad938a50b41acb18b3f17d4fa96387d6c..b6193b204865f6fda20d45828c8b65f7387f1689 100644 --- a/Modules/Wrappers/ApplicationEngine/src/otbWrapperMetaDataHelper.cxx +++ b/Modules/Wrappers/ApplicationEngine/src/otbWrapperMetaDataHelper.cxx @@ -43,7 +43,7 @@ MDType GetType(const std::string& val) case otb::MetaDataKey::TDOUBLE: ret = MDType::Double; break; - case otb::MetaDataKey::TOTB_GCP: + case otb::MetaDataKey::TGCP: ret = MDType::GCP; break; case otb::MetaDataKey::TVECTOR: @@ -100,16 +100,16 @@ void SetDouble(itk::MetaDataDictionary& dict, const std::string& key, double val itk::EncapsulateMetaData<double>(dict, key, val); } -otb::OTB_GCP GetGCP(const itk::MetaDataDictionary& dict, const std::string& key) +otb::GCP GetGCP(const itk::MetaDataDictionary& dict, const std::string& key) { - otb::OTB_GCP ret; - itk::ExposeMetaData<otb::OTB_GCP>(dict, key, ret); + otb::GCP ret; + itk::ExposeMetaData<otb::GCP>(dict, key, ret); return ret; } -void SetGCP(itk::MetaDataDictionary& dict, const std::string& key, const otb::OTB_GCP& val) +void SetGCP(itk::MetaDataDictionary& dict, const std::string& key, const otb::GCP& val) { - itk::EncapsulateMetaData<otb::OTB_GCP>(dict, key, val); + itk::EncapsulateMetaData<otb::GCP>(dict, key, val); } otb::MetaDataKey::VectorType GetVector(const itk::MetaDataDictionary& dict, const std::string& key)