diff --git a/Modules/Core/ImageBase/test/otbImageTest.cxx b/Modules/Core/ImageBase/test/otbImageTest.cxx index e404e7a2007ea2dabec48e146c97b2de69893767..6d3974be35ed834c1facbd5275f31f1c12a58fae 100644 --- a/Modules/Core/ImageBase/test/otbImageTest.cxx +++ b/Modules/Core/ImageBase/test/otbImageTest.cxx @@ -79,11 +79,15 @@ int otbImageTest(int itkNotUsed(argc), char* argv[]) } InputImageType::VectorType tab = image->GetGeoTransform(); - + file << "Geo Transform " << std::endl; - for (unsigned int i = 0; i < tab.size(); ++i) + // Don't write the identity geotransform. + if (tab != InputImageType::VectorType({0,1,0,0,0,1})) { - file << " " << i << " -> " << tab[i] << std::endl; + for (unsigned int i = 0; i < tab.size(); ++i) + { + file << " " << i << " -> " << tab[i] << std::endl; + } } tab.clear(); diff --git a/Modules/Core/ImageBase/test/otbVectorImageTest.cxx b/Modules/Core/ImageBase/test/otbVectorImageTest.cxx index 37048696502cde1c28abde5a1906e3e06e96e9e5..991023e8f447aa1de3e792e9181a9f55a94cc56c 100644 --- a/Modules/Core/ImageBase/test/otbVectorImageTest.cxx +++ b/Modules/Core/ImageBase/test/otbVectorImageTest.cxx @@ -84,9 +84,13 @@ int otbVectorImageLegacyTest(int argc, char* argv[]) InputImageType::VectorType tab = image->GetGeoTransform(); file << "Geo Transform " << std::endl; - for (unsigned int i = 0; i < tab.size(); ++i) + // Don't write the identity geotransform. + if (tab != InputImageType::VectorType({0,1,0,0,0,1})) { - file << " " << i << " -> " << tab[i] << std::endl; + for (unsigned int i = 0; i < tab.size(); ++i) + { + file << " " << i << " -> " << tab[i] << std::endl; + } } tab.clear();