Commit f86833a1 authored by Guillaume Pasero's avatar Guillaume Pasero

BUG: #1734: warn users when producing an ENVI dataset with positive Y spacing

parent 0dfeadc0
......@@ -1548,6 +1548,12 @@ void GDALImageIO::InternalWriteImageInformation(const void* buffer)
geoTransform[2] = 0.;
geoTransform[4] = 0.;
dataset->SetGeoTransform(const_cast<double*>(geoTransform.GetDataPointer()));
// Warning if writing to a ENVI file with positive Y spacing
if(driverShortName == "ENVI" && geoTransform[5] > 0.)
{
otbLogMacro(Warning,<< "ENVI dataset only support negative Y spacing, but a positive one is given. The output may have a wrong geolocation.")
}
}
/* -------------------------------------------------------------------- */
......
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