Skip to content
Prev 27013 / 29559 Next

writeRaster: BSQ despite BIL is requested

On Wed, 19 Dec 2018, Agustin Lobo wrote:

            
Which version of GDAL is under all of this? It doesn't matter here, but 
might have mattered.

raster::writeRaster() puts interleave = bsq in the *.hdr files. "BIP" and 
does not seem to do anything. However:

writeGDAL(as(testin, "SpatialGridDataFrame"), fname="testinsp.envi", 
drivername="ENVI", type="UInt16", options="INTERLEAVE=BIL", 
setStatistics=TRUE)

yields interleave = bil in the *.hdr file. Using the same route, I get:

writeRaster(testin, file="testin", format="ENVI", datatype="INT2U", 
options="INTERLEAVE=BIL", overwrite=TRUE)

with interleave = bil in the *.hdr file. I'm not sure where 
raster::writeRaster() drops the options definitions given in bandorder=, 
maybe ENVI is not a 'native' file format?

Hope this helps,

Roger