You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When saving a ".int" file for the ROI_PAC driver, the values of the raster seem to change gdal's ability to correctly guess the right driver. Large complex numbers fail, maybe by some heuristic that looks like the bytes of another driver. I'm not sure which it is guessing, since all it prints is ERROR 6: Unsupported compression
Steps to reproduce the problem.
$ ipythonPython3.8.5 (default, Sep42020, 07:30:14)
Type'copyright', 'credits'or'license'formoreinformationIPython7.18.1--AnenhancedInteractivePython. Type'?'forhelp.
In [1]: importnumpyasnp# Large complex numbers seem to fail:In [23]: arr=np.array([2180.8286+4175.303j , 1256.5812+2132.886j ,244.31543+2708.4495j,
841.01587+2190.2144j,1936.9266+4414.4624j, 1360.6066+2391.4644j], dtype=np.complex64)
In [24]: arr.tofile("test_roipac.int")
In [25]: withopen("test_roipac.int.rsc", "w") asf:
...: f.write("WIDTH 3\nFILE_LENGTH 2\n")
...:
In [26]: !gdalinfotest_roipac.intERROR6: Unsupportedcompressiongdalinfofailed-unabletoopen'test_roipac.int'.
# But the same array, with scaled down numbers, will workIn [27]: (arr/1000).tofile("test_roipac.int")
In [28]: !gdalinfotest_roipac.intDriver: ROI_PAC/ROI_PACrasterFiles: test_roipac.inttest_roipac.int.rscSizeis3, 2CornerCoordinates:
UpperLeft ( 0.0, 0.0)
LowerLeft ( 0.0, 2.0)
UpperRight ( 3.0, 0.0)
LowerRight ( 3.0, 2.0)
Center ( 1.5, 1.0)
Band1Block=3x1Type=CFloat32, ColorInterp=Undefined
Operating system
Centos 7
GDAL version and provenance
Installed through conda:
In [29]: !gdalinfo --version
GDAL 3.2.1, released 2020/12/29
The text was updated successfully, but these errors were encountered:
Expected behavior and actual behavior.
When saving a ".int" file for the ROI_PAC driver, the values of the raster seem to change gdal's ability to correctly guess the right driver. Large complex numbers fail, maybe by some heuristic that looks like the bytes of another driver. I'm not sure which it is guessing, since all it prints is
ERROR 6: Unsupported compression
Steps to reproduce the problem.
Operating system
Centos 7
GDAL version and provenance
Installed through conda:
The text was updated successfully, but these errors were encountered: