在Matlab中,我使用blockproc處理一個僅包含一個32位浮點數據帶的big(geo)tiff文件(大小爲10Gb)。Matlab-Blockproc/tifflib在寫入big tiff時失敗文件
我現在的問題是,blockproc,或更具體的tifflib,突然無法寫瓦片。這與輸入文件,硬盤/文件位置或其他參數無關,如處理,Matlab版本甚至操作系統。
它通常總是圍繞相同的tilenumber(#3372for linux,#3176 for Windows 10)。
但是,當使用較小版本的大文件(〜4Gb而不是10Gb)時,blockproc會運行。
這是錯誤消息我得到(Debian的64位,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嗎? – haraldK