Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Main Repositories
otb
Commits
fc07b486
Commit
fc07b486
authored
Oct 08, 2021
by
Julien Osman
Browse files
ENH: Read extra metadata
parent
850ce475
Pipeline
#8845
failed with stages
in 147 minutes and 45 seconds
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Modules/Core/Metadata/include/otbMetaDataKey.h
View file @
fc07b486
...
...
@@ -182,7 +182,9 @@ enum class MDStr
BeamMode
,
BeamSwath
,
AreaOrPoint
,
// ...
LayerType
,
MetadataType
,
OtbVersion
,
END
};
...
...
Modules/Core/Metadata/src/otbImageMetadata.cxx
View file @
fc07b486
...
...
@@ -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
(
Warnin
g
,
<<
"The metadata named '"
<<
kv
.
first
<<
"' with value '"
<<
kv
.
second
<<
"' was
not parsed
."
)
all_parsed
=
false
;
otbLogMacro
(
Debu
g
,
<<
"The metadata named '"
<<
kv
.
first
<<
"' with value '"
<<
kv
.
second
<<
"' was
add to ExtraKeys
."
)
;
this
->
Add
(
kv
.
first
,
kv
.
second
)
;
}
return
all_parsed
;
return
true
;
}
...
...
Modules/Core/Metadata/src/otbMetaDataKey.cxx
View file @
fc07b486
...
...
@@ -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
>
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment