diff --git a/Utilities/otbossimplugins/ossim/ossimRadarSat2Model.cpp b/Utilities/otbossimplugins/ossim/ossimRadarSat2Model.cpp index eb2fffd2a7b19684e78a37131fc24fd87859e649..19b24dd7d03757cc6271b72f9a45015f141ae8e4 100644 --- a/Utilities/otbossimplugins/ossim/ossimRadarSat2Model.cpp +++ b/Utilities/otbossimplugins/ossim/ossimRadarSat2Model.cpp @@ -1069,15 +1069,16 @@ bool ossimRadarSat2Model::loadState (const ossimKeywordlist &kwl, } } - // Load the base class. - bool result = ossimGeometricSarSensorModel::loadState(kwl, prefix); - //--- // Temp: This must be cleared or you end up with a bounding rect of all // zero's. //--- theBoundGndPolygon.clear(); + // Load the base class. + bool result = ossimGeometricSarSensorModel::loadState(kwl, prefix); + + if (result) { lookup = kwl.find(prefix, NUMBER_SRGR_COEFFICIENTS_KW); diff --git a/Utilities/otbossimplugins/ossim/ossimTerraSarModel.cpp b/Utilities/otbossimplugins/ossim/ossimTerraSarModel.cpp index 42d93f14f580a41cef3ab634bf4fbea76429d2fe..7ac33e4b9d7549199862640cf4d7320cb6f1ed64 100644 --- a/Utilities/otbossimplugins/ossim/ossimTerraSarModel.cpp +++ b/Utilities/otbossimplugins/ossim/ossimTerraSarModel.cpp @@ -163,31 +163,10 @@ bool ossimplugins::ossimTerraSarModel::open(const ossimFilename& file) << "file: " << file << "\n"; } -/* - ossimFilename filePath = ossimFilename(file.path()); - ossimDirectory directory = ossimDirectory(filePath.path()); - - std::vector<ossimFilename> vectName; - ossimString reg = ".xml"; - directory.findAllFilesThatMatch( vectName, reg, 1 ); - - -*/ bool result = false; ossimFilename xmlfile; bool findMeatadataFile = findTSXLeader(file, xmlfile); -/* - bool goodFileFound = false; - unsigned int loop = 0; - while(loop<vectName.size() && !goodFileFound) - { - ossimFilename curFile = vectName[loop]; - if(curFile.file().beforePos(3) == ossimString("TSX")) - goodFileFound = true; - else - loop++; -} -*/ + if(findMeatadataFile) { //--- @@ -515,8 +494,6 @@ bool ossimplugins::ossimTerraSarModel::loadState (const ossimKeywordlist &kwl, } } - // Load the base class. - bool result = ossimGeometricSarSensorModel::loadState(kwl, prefix); //--- // Temp: This must be cleared or you end up with a bounding rect of all @@ -524,6 +501,9 @@ bool ossimplugins::ossimTerraSarModel::loadState (const ossimKeywordlist &kwl, //--- theBoundGndPolygon.clear(); + // Load the base class. + bool result = ossimGeometricSarSensorModel::loadState(kwl, prefix); + if (result) { lookup = kwl.find(prefix,SR_GR_R0_KW);