Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Main Repositories
otb
Commits
5c0539b7
Commit
5c0539b7
authored
Mar 18, 2021
by
Julien Osman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TEST: Add test for Sentinel1 metadata reading
parent
3975b450
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7020 additions
and
12 deletions
+7020
-12
Data/Baseline/OTB/Files/ioTvImageMetadataInterfaceTest_Sentinel1.txt
...ne/OTB/Files/ioTvImageMetadataInterfaceTest_Sentinel1.txt
+0
-1
Data/Input/sentinel1/sentinel1-2.geom
Data/Input/sentinel1/sentinel1-2.geom
+7007
-0
Modules/Core/Metadata/src/otbImageMetadata.cxx
Modules/Core/Metadata/src/otbImageMetadata.cxx
+12
-11
Modules/Core/Metadata/test/CMakeLists.txt
Modules/Core/Metadata/test/CMakeLists.txt
+1
-0
No files found.
Data/Baseline/OTB/Files/ioTvImageMetadataInterfaceTest_Sentinel1.txt
View file @
5c0539b7
...
...
@@ -17,7 +17,6 @@ AverageSceneHeight 19
CalScale 1
PRF 1663.48
RadarFrequency 5.405e+09
CenterIncidenceAngle 44.7171
LineSpacing 4.08568
PixelSpacing 3.19483
AcquisitionDate 2015-06-19T19:50:43.223221Z
...
...
Data/Input/sentinel1/sentinel1-2.geom
0 → 100644
View file @
5c0539b7
This diff is collapsed.
Click to expand it.
Modules/Core/Metadata/src/otbImageMetadata.cxx
View file @
5c0539b7
...
...
@@ -741,19 +741,20 @@ bool HasOpticalSensorMetadata(const ImageMetadata & imd)
bool
HasSARSensorMetadata
(
const
ImageMetadata
&
imd
)
{
auto
hasBandMetadataStr
=
[
&
imd
](
MDStr
key
)
{
return
std
::
all_of
(
imd
.
Bands
.
begin
(),
imd
.
Bands
.
end
(),
[
key
](
ImageMetadataBase
band
){
return
band
.
Has
(
key
);});};
auto
hasBandMetadata
=
[
&
imd
](
auto
key
)
{
return
std
::
all_of
(
imd
.
Bands
.
begin
(),
imd
.
Bands
.
end
(),
[
key
](
ImageMetadataBase
band
){
return
band
.
Has
(
key
);});
};
return
imd
.
Has
(
MDStr
::
SensorID
)
&&
imd
.
Has
(
MDStr
::
Mission
)
&&
imd
.
Has
(
MDStr
::
ProductType
)
&&
imd
.
Has
(
MDNum
::
RadarFrequency
)
&&
imd
.
Has
(
MDNum
::
PRF
)
&&
imd
.
Has
(
MDTime
::
AcquisitionStartTime
)
&&
imd
.
Has
(
MDStr
::
OrbitDirection
)
&&
(
hasBandMetadata
Str
(
MDStr
::
Polarization
)
||
imd
.
Has
(
MDStr
::
Polarization
));
&&
imd
.
Has
(
MDStr
::
Mission
)
&&
imd
.
Has
(
MDStr
::
ProductType
)
&&
(
imd
.
Has
(
MDNum
::
RadarFrequency
)
||
hasBandMetadata
(
MDNum
::
RadarFrequency
))
&&
(
imd
.
Has
(
MDNum
::
PRF
)
||
hasBandMetadata
(
MDNum
::
PRF
))
&&
imd
.
Has
(
MDTime
::
AcquisitionStartTime
)
&&
imd
.
Has
(
MDStr
::
OrbitDirection
)
&&
(
hasBandMetadata
(
MDStr
::
Polarization
)
||
imd
.
Has
(
MDStr
::
Polarization
));
}
}
Modules/Core/Metadata/test/CMakeLists.txt
View file @
5c0539b7
...
...
@@ -462,6 +462,7 @@ set(spot6_geom_file ${INPUTDATA}/spot6/spot6-2.geom)
set
(
ikonos_geom_file
${
INPUTDATA
}
/ikonos/ikonos-2.geom
)
set
(
worldview2_geom_file
${
INPUTDATA
}
/wv2/wv2-2.geom
)
set
(
quickbird_geom_file
${
INPUTDATA
}
/QB/qb-2.geom
)
set
(
Sentinel1_geom_file
${
INPUTDATA
}
/sentinel1/sentinel1-2.geom
)
foreach
(
sensor
${
sensor_list
}
)
...
...
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