Commit 332a8ed2 authored by Julien Osman's avatar Julien Osman

Merge branch '2024-metadata-refac' into metadata-sentinel1

parents e6b10461 9e7931d8
......@@ -477,7 +477,8 @@ void ImageMetadata::compact()
bool compactVal;
// TODO Compact the GeometryKeys when comparisons exists
// Compact NumericKeys
for (const auto& kv : this->Bands.front().NumericKeys)
auto numKeys = this->Bands.front().NumericKeys;
for (const auto& kv : numKeys)
{
compactVal = true;
auto bandIt = this->Bands.cbegin();
......@@ -502,7 +503,8 @@ void ImageMetadata::compact()
}
}
// Compact StringKeys
for (const auto& kv : this->Bands.front().StringKeys)
auto strKeys = this->Bands.front().StringKeys;
for (const auto& kv : strKeys)
{
compactVal = true;
auto bandIt = this->Bands.cbegin();
......@@ -529,7 +531,8 @@ void ImageMetadata::compact()
// TODO Compact LUT1DKeys when comparisons exists
// TODO Compact LUT2DKeys when comparisons exists
// Compact TimeKeys
for (const auto& kv : this->Bands.front().TimeKeys)
auto timeKeys = this->Bands.front().TimeKeys;
for (const auto& kv : timeKeys)
{
compactVal = true;
auto bandIt = this->Bands.cbegin();
......@@ -554,7 +557,8 @@ void ImageMetadata::compact()
}
}
// Compact ExtraKeys
for (const auto& kv : this->Bands.front().ExtraKeys)
auto extraKeys = this->Bands.front().ExtraKeys;
for (const auto& kv : extraKeys)
{
compactVal = true;
auto bandIt = this->Bands.cbegin();
......
......@@ -130,14 +130,15 @@ otb_add_test(NAME ioTvGDALImageIOWriteMetadata COMMAND otbIOGDALTestDriver
${TEMP}/ioTvGDALImageIOWriteMetadata_Report.txt
)
otb_add_test(NAME ioTvGDALImageIOImportExportMetadata_JPEG_99 COMMAND otbIOGDALTestDriver
--compare-ascii ${NOTOL} ${BASELINE_FILES}/ioTvGDALImageIOImportExportMetadata_JPEG_99.txt
${TEMP}/ioTvGDALImageIOImportExportMetadata_JPEG_99.txt
otbGDALImageIOImportExportMetadata
${INPUTDATA}/maur_rgb_24bpp.tif
${TEMP}/ioTvGDALImageIOImportExportMetadata_JPEG_99.tif
${TEMP}/ioTvGDALImageIOImportExportMetadata_JPEG_99.txt
)
# TODO implement this test
# otb_add_test(NAME ioTvGDALImageIOImportExportMetadata_JPEG_99 COMMAND otbIOGDALTestDriver
# --compare-ascii ${NOTOL} ${BASELINE_FILES}/ioTvGDALImageIOImportExportMetadata_JPEG_99.txt
# ${TEMP}/ioTvGDALImageIOImportExportMetadata_JPEG_99.txt
# otbGDALImageIOImportExportMetadata
# ${INPUTDATA}/maur_rgb_24bpp.tif
# ${TEMP}/ioTvGDALImageIOImportExportMetadata_JPEG_99.tif
# ${TEMP}/ioTvGDALImageIOImportExportMetadata_JPEG_99.txt
# )
otb_add_test(NAME ioTvGDALOverviewsBuilder_TIFF COMMAND otbIOGDALTestDriver
otbGDALOverviewsBuilder
......
......@@ -47,7 +47,6 @@ int otbGDALImageIOImportExportMetadata(int itkNotUsed(argc), char* argv[])
// io2.CarWriteFile(outputFilename);
// io2->m_Imd = io->m_Imd;
// io2.ExportMetadata();
return 1;
return EXIT_SUCCESS;
}
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