合并多个栅格图块时栅格损坏
我有大约 1000 个光栅图块。 我正在尝试将它们合并为单个栅格图块。
library(raster)
raster_tile_path <- list.files("file_path", full.names = TRUE,
pattern = ".tif" ))
merge_tile <- lapply(raster_tile_path, raster)
merge_tile <- do.call(merge, c(merge_tile, tolerance = 1))
运行时,我收到此错误:
Error in rgdal::getRasterData(con, offset = offs, region.dim = reg, band = object@data@band) : Failure during raster IO
有人已经建议了错误来源: https://stackoverflow.com/a/67607770/9101903< /a> 可能是坏的或损坏的光栅图块。但似乎没有解决方案来识别或忽略这个特定的栅格图块。
有人知道如何解决这个问题吗?
I have a around 1000 raster tiles.
I am trying to merge them as a single raster tile.
library(raster)
raster_tile_path <- list.files("file_path", full.names = TRUE,
pattern = ".tif" ))
merge_tile <- lapply(raster_tile_path, raster)
merge_tile <- do.call(merge, c(merge_tile, tolerance = 1))
Upon running, i get this error:
Error in rgdal::getRasterData(con, offset = offs, region.dim = reg, band = object@data@band) : Failure during raster IO
Someone already suggested the source of error: https://stackoverflow.com/a/67607770/9101903 could be a bad or corrupted raster tile. But it seems that there is no solution to identify or ignore this specific raster tile.
Anybody got an idea on how to solve this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果有损坏的文件,您应该能够像这样找到它
当发生错误时,tile
i
is损坏您也可以尝试
If there is a corrupted file, you should be able to find it like this
When an error occurs, tile
i
is corruptedYou could also try