Skip to content
Prev 14671 / 29559 Next

Import BIL files in R, without the hdr file

I think BANDROWBYTES and TOTALROWBYTES should both be 214 (107 * 2)
which is the number of columns times the 2 bytes for 16 NBITS.

You can infer what should happen from another example, which you can
do by something like this:

f <- system.file("pictures/erdas_spnad83.tif", package = "rgdal")[1]
g <- readGDAL(f)

## write out to EHdr format and read in the text
writeGDAL(g, "a.bil", "EHdr")
readLines("a.hdr")

Otherwise, refer to the GDAL page for this driver:
http://www.gdal.org/frmt_various.html#EHdr

Cheers, Mike.


On Wed, Mar 28, 2012 at 12:47 AM, Guillermo Olmedo
<folmedo at mendoza.inta.gov.ar> wrote: