Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Main Repositories
otb
Commits
e9d24003
Commit
e9d24003
authored
Feb 04, 2021
by
Cédric Traizet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
REFAC: only test the number of band in an assertion when needed
parent
0ce954ad
Pipeline
#6701
passed with stages
in 101 minutes and 34 seconds
Changes
4
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
8 deletions
+5
-8
Modules/Core/Metadata/src/otbCosmoImageMetadataInterface.cxx
Modules/Core/Metadata/src/otbCosmoImageMetadataInterface.cxx
+0
-3
Modules/Core/Metadata/src/otbRadarsat2ImageMetadataInterface.cxx
.../Core/Metadata/src/otbRadarsat2ImageMetadataInterface.cxx
+2
-2
Modules/Core/Metadata/src/otbSentinel1ImageMetadataInterface.cxx
.../Core/Metadata/src/otbSentinel1ImageMetadataInterface.cxx
+1
-1
Modules/Core/Metadata/src/otbTerraSarImageMetadataInterface.cxx
...s/Core/Metadata/src/otbTerraSarImageMetadataInterface.cxx
+2
-2
No files found.
Modules/Core/Metadata/src/otbCosmoImageMetadataInterface.cxx
View file @
e9d24003
...
...
@@ -357,8 +357,6 @@ std::vector<Orbit> CosmoImageMetadataInterface::getOrbits(const MetadataSupplier
void
CosmoImageMetadataInterface
::
Parse
(
const
MetadataSupplierInterface
&
mds
)
{
assert
(
mds
.
GetNbBands
()
==
this
->
m_Imd
.
Bands
.
size
());
// Check Mission Id, acquisition mode and product type
Fetch
(
MDStr
::
Mission
,
mds
,
"MISSION_ID"
);
...
...
@@ -431,7 +429,6 @@ void CosmoImageMetadataInterface::Parse(const MetadataSupplierInterface & mds)
sarParam
.
orbits
=
this
->
getOrbits
(
mds
,
reference_UTC
);
m_Imd
.
Bands
[
0
].
Add
(
MDGeom
::
SAR
,
sarParam
);
}
...
...
Modules/Core/Metadata/src/otbRadarsat2ImageMetadataInterface.cxx
View file @
e9d24003
...
...
@@ -246,8 +246,6 @@ Radarsat2ImageMetadataInterface::UIntVectorType Radarsat2ImageMetadataInterface:
void
Radarsat2ImageMetadataInterface
::
Parse
(
const
MetadataSupplierInterface
&
mds
)
{
assert
(
mds
.
GetNbBands
()
==
this
->
m_Imd
.
Bands
.
size
());
// Metadata read by GDAL
Fetch
(
MDTime
::
AcquisitionStartTime
,
mds
,
"ACQUISITION_START_TIME"
);
// Fetch(MDTime::AcquisitionStopTime, mds, "PROCESSING_TIME");
...
...
@@ -285,6 +283,8 @@ void Radarsat2ImageMetadataInterface::Parse(const MetadataSupplierInterface & md
m_Imd
.
Add
(
MDNum
::
CenterIncidenceAngle
,
this
->
GetCenterIncidenceAngle
());
assert
(
mds
.
GetNbBands
()
==
this
->
m_Imd
.
Bands
.
size
());
SARParam
sarParam
;
for
(
int
bandId
=
0
;
bandId
<
mds
.
GetNbBands
()
;
++
bandId
)
{
...
...
Modules/Core/Metadata/src/otbSentinel1ImageMetadataInterface.cxx
View file @
e9d24003
...
...
@@ -526,7 +526,6 @@ double Sentinel1ImageMetadataInterface::getBandTerrainHeight(const XMLMetadataSu
void
Sentinel1ImageMetadataInterface
::
Parse
(
const
MetadataSupplierInterface
&
mds
)
{
assert
(
mds
.
GetNbBands
()
==
this
->
m_Imd
.
Bands
.
size
());
// Metadata read by GDAL
Fetch
(
MDTime
::
AcquisitionStartTime
,
mds
,
"ACQUISITION_START_TIME"
);
Fetch
(
MDTime
::
AcquisitionStopTime
,
mds
,
"ACQUISITION_STOP_TIME"
);
...
...
@@ -555,6 +554,7 @@ void Sentinel1ImageMetadataInterface::Parse(const MetadataSupplierInterface & md
ManifestMS
.
GetFirstAs
<
MetaData
::
Time
>
(
"xfdu:XFDU.metadataSection.metadataObject_#.metadataWrap.xmlData.safe:acquisitionPeriod.safe:startTime"
));
}
assert
(
mds
.
GetNbBands
()
==
this
->
m_Imd
.
Bands
.
size
());
// Band metadata
for
(
int
bandId
=
0
;
bandId
<
mds
.
GetNbBands
()
;
++
bandId
)
{
...
...
Modules/Core/Metadata/src/otbTerraSarImageMetadataInterface.cxx
View file @
e9d24003
...
...
@@ -1248,8 +1248,6 @@ void TerraSarImageMetadataInterface::PrintSelf(std::ostream& os, itk::Indent ind
void
TerraSarImageMetadataInterface
::
Parse
(
const
MetadataSupplierInterface
&
mds
)
{
assert
(
mds
.
GetNbBands
()
==
this
->
m_Imd
.
Bands
.
size
());
// Metadata read by GDAL
Fetch
(
MDNum
::
LineSpacing
,
mds
,
"ROW_SPACING"
);
Fetch
(
MDStr
::
Mode
,
mds
,
"IMAGING_MODE"
);
...
...
@@ -1286,6 +1284,8 @@ void TerraSarImageMetadataInterface::Parse(const MetadataSupplierInterface & mds
}
assert
(
mds
.
GetNbBands
()
==
this
->
m_Imd
.
Bands
.
size
());
SARParam
sarParam
;
for
(
int
bandId
=
0
;
bandId
<
mds
.
GetNbBands
()
;
++
bandId
)
{
...
...
Write
Preview
Markdown
is supported
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