Commit 3e3a0c44 authored by Cédric Traizet's avatar Cédric Traizet

ENH: fetch spectral sensitivity in optical IMIs

parent 08191088
......@@ -98,6 +98,8 @@ public:
void ParseDimapV1(const MetadataSupplierInterface & mds, const std::string prefix)
{
std::vector<double> defaultValue = {};
std::vector<std::string> defaultValueStr = {};
std::vector<std::string> missionVec;
ParseVector(mds, prefix + "Dataset_Sources.Source_Information"
,"Scene_Source.MISSION", missionVec);
......@@ -107,10 +109,10 @@ public:
ParseVector(mds, prefix + "Dataset_Sources.Source_Information"
,"Scene_Source.MISSION_INDEX", missionIndexVec);
m_Data.missionIndex = missionIndexVec[0];
/*
ParseVector(mds, prefix + "Radiometric_Data.Radiometric_Calibration.Instrument_Calibration.Band_Measurement_List.Band_Radiance",
"BAND_ID", m_Data.BandIDs);
*/
ParseVector(mds, prefix + "Image_Interpretation.Spectral_Band_Info",
"BAND_DESCRIPTION", m_Data.BandIDs, defaultValueStr);
ParseVector(mds, prefix + "Dataset_Sources.Source_Information",
"Scene_Source.SUN_ELEVATION", m_Data.SunElevation);
......@@ -168,17 +170,14 @@ public:
m_Data.ProductionDate = mds.GetAs<std::string>(path);
auto imagingDate = mds.GetAs<std::string>(prefix +
"Dataset_Sources.Source_Information.Scene_Source.IMAGING_DATE");
auto imagingTime = mds.GetAs<std::string>(prefix +
"Dataset_Sources.Source_Information.Scene_Source.IMAGING_TIME");
std::vector<std::string> imagingDateVec;
auto imagingDate = GetSingleValueFromList<std::string>(mds, prefix + "Dataset_Sources.Source_Information", "Scene_Source.IMAGING_DATE" );
auto imagingTime = GetSingleValueFromList<std::string>(mds, prefix + "Dataset_Sources.Source_Information", "Scene_Source.IMAGING_TIME" );
m_Data.AcquisitionDate = imagingDate + "T" + imagingTime;
m_Data.Instrument = mds.GetAs<std::string>(prefix +
"Dataset_Sources.Source_Information.Scene_Source.INSTRUMENT");
m_Data.InstrumentIndex = mds.GetAs<std::string>(prefix +
"Dataset_Sources.Source_Information.Scene_Source.INSTRUMENT_INDEX");
m_Data.Instrument = GetSingleValueFromList<std::string>(mds, prefix + "Dataset_Sources.Source_Information", "Scene_Source.INSTRUMENT" );
m_Data.InstrumentIndex = GetSingleValueFromList<std::string>(mds, prefix + "Dataset_Sources.Source_Information", "Scene_Source.INSTRUMENT_INDEX" );
m_Data.ProcessingLevel = mds.GetAs<std::string>
(prefix + "Data_Processing.PROCESSING_LEVEL");
......
......@@ -161,6 +161,8 @@ protected:
private:
FormosatImageMetadataInterface(const Self&) = delete;
void operator=(const Self&) = delete;
void FetchSpectralSensitivity();
};
} // end namespace otb
......
......@@ -152,6 +152,8 @@ private:
void FetchAcquisitionDate(const std::string & acquisitionDate,
const std::string & acquisitionTime);
void FetchSpectralSensitivity(const std::string & bandName);
};
} // end namespace otb
......
......@@ -168,6 +168,7 @@ private:
const std::vector<double> & axrossTrackIncidenceAngles,
const std::vector<double> & sceneOrientation);
void FetchSpectralSensitivity(const std::string & sensorId);
};
} // end namespace otb
......
......@@ -140,13 +140,13 @@ public:
protected:
QuickBirdImageMetadataInterface();
~QuickBirdImageMetadataInterface() override
{
}
~QuickBirdImageMetadataInterface() override = default;
private:
QuickBirdImageMetadataInterface(const Self&) = delete;
void operator=(const Self&) = delete;
void FetchSpectralSensitivity();
};
} // end namespace otb
......
......@@ -155,13 +155,13 @@ public:
protected:
Spot6ImageMetadataInterface();
~Spot6ImageMetadataInterface() override
{
}
~Spot6ImageMetadataInterface() = default;
private:
Spot6ImageMetadataInterface(const Self&) = delete;
void operator=(const Self&) = delete;
void FetchSpectralSensitivity(const std::string & sensorId);
};
} // end namespace otb
......
......@@ -162,13 +162,13 @@ public:
protected:
SpotImageMetadataInterface();
~SpotImageMetadataInterface() override
{
}
~SpotImageMetadataInterface() override = default;
private:
SpotImageMetadataInterface(const Self&) = delete;
void operator=(const Self&) = delete;
void FetchSpectralSensitivity();
};
} // end namespace otb
......
......@@ -152,7 +152,8 @@ private:
void FetchSolarIrradiance();
void FetchPhysicalGain(const MetadataSupplierInterface &);
void FetchDates(const MetadataSupplierInterface &);
void FetchWavelengths();
void FetchWavelengths();
void FetchSpectralSensitivity();
};
} // end namespace otb
......
......@@ -116,6 +116,7 @@ ImageMetadataInterfaceFactory
{
// silent catch of MissingMetadataException
// just means that this IMI can't parse the file
std::cout << e.what() << std::endl;
}
}
else
......
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