Commit ba18f577 authored by Julien Osman's avatar Julien Osman
Browse files

BUG: Read terrasar's polarization later prevents surcharging polarization for other sensors

parent 81be5e99
Pipeline #7577 canceled with stages
......@@ -1109,10 +1109,6 @@ void ReadSARSensorModel(const XMLMetadataSupplier & xmlMS,
void TerraSarImageMetadataInterface::ParseGdal(ImageMetadata &imd)
{
// Polarisation
auto polarization =
itksys::SystemTools::GetFilenameName(m_MetadataSupplierInterface->GetResourceFile("")).substr(6, 2);
imd.Add(MDStr::Polarization, polarization);
// Main XML file
std::string MainDirectory = itksys::SystemTools::GetParentDirectory(
itksys::SystemTools::GetParentDirectory(m_MetadataSupplierInterface->GetResourceFile("")));
......@@ -1142,6 +1138,12 @@ void TerraSarImageMetadataInterface::ParseGdal(ImageMetadata &imd)
imd.Add(MDNum::RangeTimeLastPixel, MainXMLFileMetadataSupplier.GetFirstAs<double>("level1Product.productInfo.sceneInfo.rangeTime.lastPixel"));
imd.Add(MDNum::PRF, MainXMLFileMetadataSupplier.GetAs<double>("level1Product.productSpecific.complexImageInfo.commonPRF"));
imd.Add(MDNum::RSF, MainXMLFileMetadataSupplier.GetAs<double>("level1Product.productSpecific.complexImageInfo.commonRSF"));
// Polarisation
auto polarization =
itksys::SystemTools::GetFilenameName(m_MetadataSupplierInterface->GetResourceFile("")).substr(6, 2);
imd.Add(MDStr::Polarization, polarization);
auto numberOfCalFactor = MainXMLFileMetadataSupplier.GetNumberOf("level1Product.calibration.calibrationConstant");
if(numberOfCalFactor == 1)
{
......
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