Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julien Osman
otb
Commits
9c0709c5
Commit
9c0709c5
authored
4 years ago
by
Julien Osman
Browse files
Options
Downloads
Patches
Plain Diff
ENH: Read number of band from GEOM file using "support_data.number_bands"
parent
ad72b73f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Data/Baseline/OTB/Images/dmTvMultiDisparityMapTo3DFilterOutput.geom
+2
-2
2 additions, 2 deletions
...ine/OTB/Images/dmTvMultiDisparityMapTo3DFilterOutput.geom
Modules/Core/Metadata/src/otbGeomMetadataSupplier.cxx
+8
-1
8 additions, 1 deletion
Modules/Core/Metadata/src/otbGeomMetadataSupplier.cxx
with
10 additions
and
3 deletions
Data/Baseline/OTB/Images/dmTvMultiDisparityMapTo3DFilterOutput.geom
+
2
−
2
View file @
9c0709c5
...
...
@@ -145,7 +145,7 @@ samp_off: 20750
samp_scale
:
20749
.
5
sensor
:
PHR
1
A
support_data
.
azimuth_angle
:
"""80.2522912450309 79.9972007995515 79.7424588085454 """
support_data
.
band_name_list
:
"""P """
support_data
.
band_name_list
:
"""P
Q R
"""
support_data
.
elevation_angle
:
"""70.6794398393405 70.6639265028018 70.6478415472195 """
support_data
.
image_date
:
2012
-
07
-
19
T15
:
34
:
14
.
1
Z
support_data
.
image_id
:
565234101
-
001
...
...
@@ -156,7 +156,7 @@ support_data.instrument_index: 1A
support_data
.
line_period
:
0
support_data
.
ll_ground_point
:
18
.
474937683268
-
72
.
4019514529938
0
WGE
support_data
.
lr_ground_point
:
18
.
4745584022313
-
72
.
2113475033199
0
WGE
support_data
.
number_bands
:
1
support_data
.
number_bands
:
3
support_data
.
number_of_azimuth_angle
:
3
support_data
.
number_of_elevation_angle
:
3
support_data
.
number_of_incident_angle
:
3
...
...
This diff is collapsed.
Click to expand it.
Modules/Core/Metadata/src/otbGeomMetadataSupplier.cxx
+
8
−
1
View file @
9c0709c5
...
...
@@ -55,7 +55,14 @@ std::string GeomMetadataSupplier::GetResourceFile(std::string) const
int
GeomMetadataSupplier
::
GetNbBands
()
const
{
bool
hasValue
;
std
::
string
ret
=
this
->
GetMetadataValue
(
"support_data.band_name_list"
,
hasValue
);
std
::
string
ret
=
this
->
GetMetadataValue
(
"support_data.number_bands"
,
hasValue
);
if
(
hasValue
)
{
boost
::
algorithm
::
trim_if
(
ret
,
boost
::
algorithm
::
is_any_of
(
"
\"
"
));
return
std
::
stoi
(
ret
);
}
ret
=
this
->
GetMetadataValue
(
"support_data.band_name_list"
,
hasValue
);
boost
::
algorithm
::
trim_if
(
ret
,
boost
::
algorithm
::
is_any_of
(
"
\"
"
));
if
(
!
hasValue
)
otbGenericExceptionMacro
(
MissingMetadataException
,
<<
"Missing metadata 'support_data.band_name_list'"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment