Can not write in hdr file format with positive y spacing starting gdal 2.2.0
Gdal does not support writing of ENVI file format files with positive y spacing (see https://github.com/OSGeo/gdal/issues/944 ). This has always been the case, but is now highlighted by the introduction of rotated dataset support in gdal >= 2.2.0. As a result, gdal fails to read back properly HDR file with positive y spacing, which result in breaking 61 tests in OTB, for instance:
Steps to reproduce
$ CPL_DEBUG=ON otbcli_Convert -in otb-data/Input/phr_pan.tif -out test.hdr ENVI: rot1 = 0, rot2 = 180 Warning 1: Geotransform matrix has non rotational terms $ ./bin/otbcli_ReadImageInfo -in otb-data/Input/phr_pan.tif [...] Spacing : [1,1] [...] $ ./bin/otbcli_ReadImageInfo -in test.hdr [...] Spacing : [6.12323e-17,-6.12323e-17] [...]
- Replace all baselines in envi format by tif format
GdalImageIO, warn if someone tries to write in envi format with a positive y spacing.