diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/ossimRadarSat2ProductDoc.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/ossimRadarSat2ProductDoc.cpp index 65a03bea50565382b7fb2fb3e82ff5616e0934dc..569f21e79fd9b945a5c54f7aa616d12db2976ab4 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/ossimRadarSat2ProductDoc.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/ossimRadarSat2ProductDoc.cpp @@ -465,7 +465,7 @@ bool ossimRadarSat2ProductDoc::initGsd(const ossimXmlDocument* xdoc, ossimString s; if ( getSampledPixelSpacing(xdoc, s) ) { - gsd.x = s.toFloat64(); + gsd.x = ossimString::toFloat64(s); } else { @@ -473,7 +473,7 @@ bool ossimRadarSat2ProductDoc::initGsd(const ossimXmlDocument* xdoc, } if ( getSampledLineSpacing(xdoc, s) ) { - gsd.y = s.toFloat64(s); + gsd.y = ossimString::toFloat64(s); } else { @@ -496,6 +496,20 @@ bool ossimRadarSat2ProductDoc::initGsd(const ossimXmlDocument* xdoc, return result; } + + +bool ossimRadarSat2ProductDoc::getAcquistionDate(const ossimXmlDocument* xdoc, ossimString& adate) +{ + ossimString path = "/product/sourceAttributes/rawDataStartTime"; + return ossim::getPath(path, xdoc, adate); +} + +bool ossimRadarSat2ProductDoc::getProductionDate(const ossimXmlDocument* xdoc, ossimString& pdate) +{ + ossimString path = "/product/imageGenerationParameters/generalProcessingInformation/processingTime"; + return ossim::getPath(path, xdoc, pdate); +} + bool ossimRadarSat2ProductDoc::initTiePoints(const ossimXmlDocument* xdoc, std::list<ossimGpt>& gcp, std::list<ossimDpt>& icp) const @@ -889,15 +903,15 @@ bool ossimRadarSat2ProductDoc::getImageFile(const ossimXmlDocument* xdoc, { bool result = false; ossimString fileName; - + ossimString path = "/product/imageAttributes/fullResolutionImageData"; - + if ( ossim::getPath(path, xdoc, fileName) ) { result = true; s = fileName; } - + return result; } diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/ossimRadarSat2ProductDoc.h b/Modules/ThirdParty/OssimPlugins/src/ossim/ossimRadarSat2ProductDoc.h index 56bf0a7ab75915bd15c3281189bb72eeac80a10f..ae376b08f88bcab27af8d9c9b303b64bf12e5bed 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/ossimRadarSat2ProductDoc.h +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/ossimRadarSat2ProductDoc.h @@ -51,7 +51,7 @@ typedef struct vector<double> lineDenominatorCoefficients; vector<double> pixelNumeratorCoefficients; vector<double> pixelDenominatorCoefficients; - + }RPCModel; namespace ossimplugins @@ -59,17 +59,17 @@ namespace ossimplugins class PlatformPosition; class RefPoint; class SensorParams; - + /** @brief Class to encapsulate parsing RadarSat2 product.xml file. */ class OSSIM_PLUGINS_DLL ossimRadarSat2ProductDoc { public: /** @brief default constructor */ ossimRadarSat2ProductDoc(); - + /** @brief destructor */ ~ossimRadarSat2ProductDoc(); - + /** * @brief Checks for node /product/sourceAttributes/satellite containing * RADARSAT-2. @@ -77,9 +77,9 @@ public: * @return true if present, false if not. */ bool isRadarSat2(const ossimXmlDocument* xdoc) const; - + RPCModel getRpcData(const ossimXmlDocument* xdoc) const; - + /** * @brief Method to initialize PlatformPosition object from * RadarSat "product.xml" file. @@ -89,7 +89,7 @@ public: */ bool initPlatformPosition(const ossimXmlDocument* xdoc, PlatformPosition* pos) const; - + /** * @brief Method to initialize SensorParams object from * RadarSat "product.xml" file. @@ -99,7 +99,7 @@ public: */ bool initSensorParams(const ossimXmlDocument* xdoc, SensorParams* sp) const; - + /** * @brief Method to initialize image size from * RadarSat "product.xml" file. @@ -109,7 +109,7 @@ public: */ bool initImageSize(const ossimXmlDocument* xdoc, ossimIpt& imageSize) const; - + /** * @brief Method to initialize gsd from * RadarSat "product.xml" file. @@ -119,7 +119,11 @@ public: */ bool initGsd(const ossimXmlDocument* xdoc, ossimDpt& gsd) const; - + + bool getAcquistionDate(const ossimXmlDocument* xdoc, ossimString& adate); + + bool getProductionDate(const ossimXmlDocument* xdoc, ossimString& pdate); + /** * @brief Method to initialize image tie points from * RadarSat "product.xml" file. @@ -132,7 +136,7 @@ public: std::list<ossimDpt>& icp) const; bool getSatellite(const ossimXmlDocument* xdoc, ossimString& s) const; - + bool getSensor(const ossimXmlDocument* xdoc, ossimString& s) const; @@ -222,7 +226,7 @@ public: bool getIncidenceAngleFarRange(const ossimXmlDocument* xdoc, ossimString& s) const; - + bool getSatelliteHeight(const ossimXmlDocument* xdoc, ossimString& s) const; };