Commit 7d7a6d33 authored by Guillaume Pasero's avatar Guillaume Pasero

Merge branch '1734-hdr-warning-gdalio' into 'develop'

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

Closes #1734

See merge request !274
parents 2d791cf5 4486f3df
......@@ -1548,6 +1548,15 @@ void GDALImageIO::InternalWriteImageInformation(const void* buffer)
geoTransform[2] = 0.;
geoTransform[4] = 0.;
dataset->SetGeoTransform(const_cast<double*>(geoTransform.GetDataPointer()));
// Error if writing to a ENVI file with a positive Y spacing
if(driverShortName == "ENVI" && geoTransform[5] > 0.)
{
itkExceptionMacro(
<< "Can not 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