【发布时间】:2017-05-11 12:10:58
【问题描述】:
在 Matlab 中,我使用 blockproc 处理仅包含一个 32 位浮点数据带的大(地理)tiff 文件(大约 10Gb)。
我现在的问题是 blockproc,或更具体的 tifflib,突然无法写入磁贴。这与输入文件、硬盘/文件位置或其他参数(例如处理、Matlab 版本甚至操作系统)无关。
而且它通常总是在相同的 tilenumber 附近(#3372 用于 linux,#3176 用于 Windows 10)。
但当使用较小版本的大文件(约 4Gb 而不是 10Gb)时,blockproc 会运行。
这是我收到的错误消息(Debian 64bit,Matlab 2014b):
Warning: The following error was caught while executing 'images.internal.TileHandle'
class destructor:
Unable to write tile #3684.
> In TileCache>TileCache.setTile at 71
In TiffAdapter>TiffAdapter.getTileHandle at 560
In TiffAdapter>TiffAdapter.writeRegion at 354
In blockproc>putBlock at 879
In blockproc>serialLoop at 459
In blockproc at 340
In removeEGM at 13
Warning: The following error was caught while executing 'images.internal.TileHandle'
class destructor:
Unable to write tile #3685.
> In TileCache>TileCache.setTile at 71
In TiffAdapter>TiffAdapter.getTileHandle at 560
In TiffAdapter>TiffAdapter.writeRegion at 354
In blockproc>putBlock at 879
In blockproc>serialLoop at 459
In blockproc at 340
In removeEGM at 13
Warning: The following error was caught while executing 'images.internal.TileHandle'
class destructor:
Unable to write tile #3686.
> In TileCache>TileCache.setTile at 71
In TiffAdapter>TiffAdapter.getTileHandle at 560
In TiffAdapter>TiffAdapter.writeRegion at 354
In blockproc>putBlock at 879
In blockproc>serialLoop at 459
In blockproc at 340
In removeEGM at 13
Warning: The following error was caught while executing 'images.internal.TileHandle'
class destructor:
Unable to write tile #3687.
> In TileCache>TileCache.setTile at 71
In TiffAdapter>TiffAdapter.getTileHandle at 560
In TiffAdapter>TiffAdapter.writeRegion at 354
In blockproc>putBlock at 879
In blockproc>serialLoop at 459
In blockproc at 340
In removeEGM at 13
Error using tifflib
Unable to write tile #3372.
Error in Tiff/writeEncodedTile (line 1602)
tifflib('writeEncodedTile',obj.FileID,tileNumber-1,varargin{:});
Error in images.internal.TiffAdapter/writeBlock (line 420)
obj.TiffObj.writeEncodedTile(blockId, block);
Error in images.internal.TiffAdapter/writeRegion (line 377)
obj.writeBlock(blockId, data(ry - start(1) + 1, ...
Error in blockproc>putBlock (line 879)
dest.writeRegion(start_loc,...
Error in blockproc/serialLoop (line 459)
putBlock(options.Destination,row,col,output_block,output_size);
Error in blockproc (line 340)
serialLoop();
Error in removeEGM (line 13)
blockproc(in_dem, [3000, 3000], my_fun, 'Destination', out_dem);
【问题讨论】:
-
您是在尝试编写“大 TIFF 文件”还是 BigTIFF 文件?由于使用无符号 32 位偏移,TIFF 文件格式的文件大小硬限制为 4GB。另一方面,BigTIFF 使用 64 位偏移,并且可以处理更大的文件。您确定在使用的 Matlab/TIFF 库中支持 BigTIFF 吗?
标签: matlab image-processing io tiff