Commit ff17a68f authored by Cédric Traizet's avatar Cédric Traizet
Browse files

BUG: don't write identity geotransform (0,1,0,0,0,1) in ImageTest and...

BUG: don't write identity geotransform (0,1,0,0,0,1) in ImageTest and VectorImageTest (back compatibility)
parent 371d01ae
...@@ -81,10 +81,14 @@ int otbImageTest(int itkNotUsed(argc), char* argv[]) ...@@ -81,10 +81,14 @@ int otbImageTest(int itkNotUsed(argc), char* argv[])
InputImageType::VectorType tab = image->GetGeoTransform(); InputImageType::VectorType tab = image->GetGeoTransform();
file << "Geo Transform " << std::endl; file << "Geo Transform " << std::endl;
// Don't write the identity geotransform.
if (tab != InputImageType::VectorType({0,1,0,0,0,1}))
{
for (unsigned int i = 0; i < tab.size(); ++i) for (unsigned int i = 0; i < tab.size(); ++i)
{ {
file << " " << i << " -> " << tab[i] << std::endl; file << " " << i << " -> " << tab[i] << std::endl;
} }
}
tab.clear(); tab.clear();
tab = image->GetUpperLeftCorner(); tab = image->GetUpperLeftCorner();
......
...@@ -84,10 +84,14 @@ int otbVectorImageLegacyTest(int argc, char* argv[]) ...@@ -84,10 +84,14 @@ int otbVectorImageLegacyTest(int argc, char* argv[])
InputImageType::VectorType tab = image->GetGeoTransform(); InputImageType::VectorType tab = image->GetGeoTransform();
file << "Geo Transform " << std::endl; file << "Geo Transform " << std::endl;
// Don't write the identity geotransform.
if (tab != InputImageType::VectorType({0,1,0,0,0,1}))
{
for (unsigned int i = 0; i < tab.size(); ++i) for (unsigned int i = 0; i < tab.size(); ++i)
{ {
file << " " << i << " -> " << tab[i] << std::endl; file << " " << i << " -> " << tab[i] << std::endl;
} }
}
tab.clear(); tab.clear();
tab = image->GetUpperLeftCorner(); tab = image->GetUpperLeftCorner();
......
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