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

ENH: Read extra metadata

parent 850ce475
Pipeline #8845 failed with stages
in 147 minutes and 45 seconds
......@@ -182,7 +182,9 @@ enum class MDStr
BeamMode,
BeamSwath,
AreaOrPoint,
// ...
LayerType,
MetadataType,
OtbVersion,
END
};
......
......@@ -373,8 +373,6 @@ std::string ImageMetadataBase::ToJSON(bool multiline) const
bool ImageMetadataBase::FromKeywordlist(const Keywordlist& kwl)
{
// Return value
bool all_parsed = true;
// search iterators
for (const auto& kv : kwl)
{
......@@ -460,10 +458,10 @@ bool ImageMetadataBase::FromKeywordlist(const Keywordlist& kwl)
this->Add(kv.first.substr(prefix.size()), kv.second);
continue;
}
otbLogMacro(Warning, << "The metadata named '" << kv.first << "' with value '" << kv.second << "' was not parsed.")
all_parsed = false;
otbLogMacro(Debug, << "The metadata named '" << kv.first << "' with value '" << kv.second << "' was add to ExtraKeys.");
this->Add(kv.first, kv.second);
}
return all_parsed;
return true;
}
......
......@@ -422,7 +422,10 @@ MDStrBmType MDStrNames = bimapGenerator<MDStr>(std::map<MDStr, std::string> {
{MDStr::EnhancedBandName,"EnhancedBandName"},
{MDStr::BeamMode, "BeamMode"},
{MDStr::BeamSwath, "BeamSwath"},
{MDStr::AreaOrPoint, "AreaOrPoint"},
{MDStr::AreaOrPoint, "AREA_OR_POINT"},
{MDStr::LayerType, "LAYER_TYPE"},
{MDStr::MetadataType, "METADATATYPE"},
{MDStr::OtbVersion, "OTB_VERSION"},
});
MDTimeBmType MDTimeNames = bimapGenerator<MDTime>(std::map<MDTime, std::string> {
......
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