0

我想将一些 Landsat 波段/tiff 文件堆叠并写入 ENVI 格式的 BIP 交错。然而,结果总是以 BSQ 的形式出现,即使我将 bandorder 更改为 BIP。

下面是我的代码:

library(raster)
library(rgdal)
library(gdalUtils)

inbands <-list.files(pattern= "*.tif")
stk<-stack(inbands[2], inbands[3], inbands[4])
writeRaster(stk, "BIP_test", format="ENVI", bandorder='BIP') 

这也不起作用

writeRaster(stk, "BIP_test", format="ENVI",  options="INTERLEAVE=PIXEL", overwrite=TRUE) 

任何帮助表示赞赏。

4

1 回答 1

2

我认为这应该有效:

writeRaster(stk, "BIP_test", format="ENVI",  options="INTERLEAVE=BIP", overwrite=TRUE)

根据ENVI 格式上的 GDAL 格式页面,“BIP”(不是“PIXEL”)是“INTERLEAVE”的参数。根据我对帮助文件的阅读WriteRasterbandorder='BIP'仅适用于光栅包的本机文件格式。

于 2015-01-09T20:55:31.307 回答