Commit 61aa7ea8 authored by Guillaume Pasero's avatar Guillaume Pasero

BUG: #1734: change warning into an exception

parent f86833a1
......@@ -1549,10 +1549,13 @@ void GDALImageIO::InternalWriteImageInformation(const void* buffer)
geoTransform[4] = 0.;
dataset->SetGeoTransform(const_cast<double*>(geoTransform.GetDataPointer()));
// Warning if writing to a ENVI file with positive Y spacing
// Error if writing to a ENVI file with a 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.")
itkExceptionMacro(
<< "Can't write to ENVI file format with a positive Y spacing ("
<< m_FileName
<<")");
}
}
......
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