From 14741fa5938e62a75f4302d1690cd9fe9429156f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20Traizet?= <cedric.traizet@c-s.fr>
Date: Mon, 12 Oct 2020 16:12:19 +0200
Subject: [PATCH] STY: remove comment

---
 .../src/otbPleiadesImageMetadataInterface.cxx | 95 -------------------
 1 file changed, 95 deletions(-)

diff --git a/Modules/Core/Metadata/src/otbPleiadesImageMetadataInterface.cxx b/Modules/Core/Metadata/src/otbPleiadesImageMetadataInterface.cxx
index 62049fd8f5..bc9cda96d7 100644
--- a/Modules/Core/Metadata/src/otbPleiadesImageMetadataInterface.cxx
+++ b/Modules/Core/Metadata/src/otbPleiadesImageMetadataInterface.cxx
@@ -1920,101 +1920,6 @@ void PleiadesImageMetadataInterface::FetchSolarIrradiance(const std::vector<doub
     solarIrradianceIt++;
   }
 
-  /*
-  const MetaDataDictionaryType& dict = this->GetMetaDataDictionary();
-  if (!this->CanRead())
-  {
-    itkExceptionMacro(<< "Invalid Metadata, no Pleiades Image");
-  }
-
-  ImageKeywordlistType imageKeywordlist;
-
-  if (dict.HasKey(MetaDataKey::OSSIMKeywordlistKey))
-  {
-    itk::ExposeMetaData<ImageKeywordlistType>(dict, MetaDataKey::OSSIMKeywordlistKey, imageKeywordlist);
-  }
-
-  std::vector<double> outputValues;
-  if (imageKeywordlist.HasKey("support_data.solar_irradiance"))
-  {
-    std::vector<std::string> outputValuesString;
-    std::string              valueString = imageKeywordlist.GetMetadataByKey("support_data.solar_irradiance");
-    boost::trim(valueString);
-    boost::split(outputValuesString, valueString, boost::is_any_of(" "));
-    for (unsigned int i = 0; i < outputValuesString.size(); ++i)
-    {
-      outputValues.push_back(atof(outputValuesString[i].c_str()));
-    }
-  }
-
-  VariableLengthVectorType outputValuesVariableLengthVector;
-  outputValuesVariableLengthVector.SetSize(outputValues.size());
-  outputValuesVariableLengthVector.Fill(0);
-
-  // Check that values read from metadata is not too far from the standard realistic values
-  // '999' are likely to be dummy values (see Mantis #601)
-  // This values were provided by the French Space Agency
-  double defaultRadianceMS[4];
-  double defaultRadianceP;
-
-  const std::string sensorId = this->GetSensorID();
-  if (sensorId == "PHR 1A")
-  {
-    // MS, ordered as B0, B1, B2, B3
-    defaultRadianceMS[0] = 1915.01;
-    defaultRadianceMS[1] = 1830.57;
-    defaultRadianceMS[2] = 1594.06;
-    defaultRadianceMS[3] = 1060.01;
-
-    defaultRadianceP = 1548.71;
-  }
-  else if (sensorId == "PHR 1B")
-  {
-    // MS, ordered as B0, B1, B2, B3
-    defaultRadianceMS[0] = 1926.51688;
-    defaultRadianceMS[1] = 1805.91412;
-    defaultRadianceMS[2] = 1533.60973;
-    defaultRadianceMS[3] = 1019.23037;
-
-    defaultRadianceP = 1529.00384;
-  }
-  else
-  {
-    itkExceptionMacro(<< "Invalid sensor ID.");
-  }
-
-  // tolerance threshold
-  double tolerance = 0.05;
-
-  if (outputValues.size() == 1)
-  {
-    // Pan
-    if (std::abs(outputValues[0] - defaultRadianceP) > (tolerance * defaultRadianceP))
-    {
-      outputValuesVariableLengthVector[0] = defaultRadianceP;
-    }
-    else
-    {
-      outputValuesVariableLengthVector[0] = outputValues[0];
-    }
-  }
-  else
-  {
-    // MS
-    for (unsigned int i = 0; i < outputValues.size(); ++i)
-    {
-      int wavelenghPos = this->BandIndexToWavelengthPosition(i);
-      if (std::abs(outputValues[wavelenghPos] - defaultRadianceMS[wavelenghPos]) > (tolerance * defaultRadianceMS[wavelenghPos]))
-      {
-        outputValuesVariableLengthVector[i] = defaultRadianceMS[wavelenghPos];
-      }
-      else
-      {
-        outputValuesVariableLengthVector[i] = outputValues[wavelenghPos];
-      }
-    }
-  }
-*/
 }
 
 
-- 
GitLab