Commit fb9ff48a authored by Guillaume Pasero's avatar Guillaume Pasero

BUG: fix detection of Sentinel1 products

parent bd0c4014
......@@ -211,6 +211,8 @@ namespace ossimplugins
// -----[ Read manifest file
const ossimFilename safeFile = searchManifestFile(file);
ossimString sensorId;
ossimString imageId;
if ( !safeFile.empty() )
{
......@@ -232,8 +234,8 @@ namespace ossimplugins
ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << "Manifest file " << safeFile << " opened\n";
}
theImageID = getImageId(manifestDoc);
if (theImageID.empty()) {
imageId = getImageId(manifestDoc);
if (imageId.empty()) {
ossimNotify(ossimNotifyLevel_FATAL) << MODULE << "Image ID not found in manifest file " << safeFile << "\n";
return false;
}
......@@ -243,8 +245,8 @@ namespace ossimplugins
return false;
}
theSensorID = initSensorID(manifestDoc);
if (theSensorID.empty()) {
sensorId = initSensorID(manifestDoc);
if (sensorId.empty()) {
ossimNotify(ossimNotifyLevel_FATAL) << MODULE << "Cannot load sensor ID from " << safeFile << "\n";
return false;
}
......@@ -313,6 +315,10 @@ namespace ossimplugins
return false;
}
// Fix sensor and image ID as they may be overriden during SensorModel::loadState()
theSensorID = sensorId;
theImageID = imageId;
theImageClipRect = ossimDrect( 0, 0, theImageSize.x-1, theImageSize.y-1 );
theSubImageOffset.x = 0.0;
theSubImageOffset.y = 0.0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment