Commit b631f032 authored by Cédric Traizet's avatar Cédric Traizet
Browse files

REFAC: use mono-band (scalar or complex) products in SarSensorModel

parent 7d467b7d
Pipeline #7664 failed with stages
in 90 minutes and 15 seconds
......@@ -464,8 +464,8 @@ void CosmoImageMetadataInterface::ParseGdal(ImageMetadata & imd)
* 1e6);
sarParam.nearRangeTime = std::stod(metadataBands[0]["S01_SBI_Zero_Doppler_Range_First_Time"]);
imd.Bands[0].Add(MDGeom::SAR, sarParam);
imd.Add(MDGeom::SAR, sarParam);
SARCalib sarCalib;
LoadRadiometricCalibrationData(sarCalib, *m_MetadataSupplierInterface, imd);
imd.Add(MDGeom::SARCalib, sarCalib);
......@@ -502,7 +502,7 @@ void CosmoImageMetadataInterface::ParseGeom(ImageMetadata &imd)
//SAR Parameters
SARParam sarParam;
sarParam.orbits = this->GetOrbitsGeom();
imd.Bands[0].Add(MDGeom::SAR, sarParam);
imd.Add(MDGeom::SAR, sarParam);
SARCalib sarCalib;
LoadRadiometricCalibrationData(sarCalib, *m_MetadataSupplierInterface, imd);
imd.Add(MDGeom::SARCalib, sarCalib);
......
......@@ -863,7 +863,7 @@ void Sentinel1ImageMetadataInterface::ParseGeom(ImageMetadata & imd)
auto hasSAR = GetSAR(sarParam);
if (hasSAR)
{
imd.Bands[0].Add(MDGeom::SAR, sarParam);
imd.Add(MDGeom::SAR, sarParam);
}
SARCalib sarCalib;
std::istringstream(m_MetadataSupplierInterface->GetAs<std::string>("calibration.startTime")) >> sarCalib.calibrationStartTime;
......
......@@ -58,12 +58,12 @@ SarSensorModel::SarSensorModel(const ImageMetadata & imd)
m_AzimuthTimeOffset(boost::posix_time::seconds(0)),
m_RangeTimeOffset(0.)
{
if (!imd.Bands[0].Has(MDGeom::SAR))
if (!imd.Has(MDGeom::SAR))
{
otbGenericExceptionMacro(itk::ExceptionObject, <<"Input metadata does not contain SAR parameters");
}
m_SarParam = boost::any_cast<SARParam>(imd.Bands[0][MDGeom::SAR]);
m_SarParam = boost::any_cast<SARParam>(imd[MDGeom::SAR]);
OptimizeTimeOffsetsFromGcps();
......
......@@ -228,7 +228,7 @@ if (Boost_UNIT_TEST_FRAMEWORK_FOUND)
otb_add_test(NAME prTvSarSensorModelSentinel1_SLC
COMMAND otbSarSensorModelTest --
LARGEINPUT{SENTINEL1/S1A_S6_SLC__1SSV_20150619T195043/manifest.safe}
LARGEINPUT{SENTINEL1/S1A_S6_SLC__1SSV_20150619T195043/measurement/s1a-s6-slc-vv-20150619t195043-20150619t195101-006447-00887d-001.tiff}
-23.9431732671333
15.7637929806278
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