Commit 5c0539b7 authored by Julien Osman's avatar Julien Osman
Browse files

TEST: Add test for Sentinel1 metadata reading

parent 3975b450
......@@ -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
......
This diff is collapsed.
......@@ -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)
&& (hasBandMetadataStr(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));
}
}
......@@ -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})
......
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