[R-sig-Geo] using readGDAL() for ESRI raster file

karl.sommer at dpi.vic.gov.au karl.sommer at dpi.vic.gov.au
Thu Jun 1 06:28:32 CEST 2006

Hello list

thanks to the helpful advice given by list members I have been able to read
and re-project vector based shape files and attributes data using readOGR()
under rgdal for further analysis (kriging, k-means clustering) and

Using the sp.layout under spplot allowed me to precisely overlay different
data layers.

Yesterday  I was attempting to use the function readGDAL() to read an ESRI
*.bil raster file of remote sensing spectral data.

Using GDALinfo under DOS within the data directory where the file is
located gave me the following information

gdalinfo -nomd inputfile.bil

Driver: EHdr/ESRI .hdr Labelled
Size is 813, 516
Coordinate System is `'
Origin = (617405.000000,6190325.500000)
Pixel Size = (0.50000000,-0.50000000)
Corner Coordinates:
Upper Left  (  617405.000, 6190325.500)
Lower Left  (  617405.000, 6190067.500)
Upper Right (  617811.500, 6190325.500)
Lower Right (  617811.500, 6190067.500)
Center      (  617608.250, 6190196.500)
Band 1 Block=813x1 Type=Int16, ColorInterp=Undefined
Band 2 Block=813x1 Type=Int16, ColorInterp=Undefined
Band 3 Block=813x1 Type=Int16, ColorInterp=Undefined
Band 4 Block=813x1 Type=Int16, ColorInterp=Undefined
Band 5 Block=813x1 Type=Int16, ColorInterp=Undefined
Band 6 Block=813x1 Type=Int16, ColorInterp=Undefined

when I am trying to read the same file using readGDAL() in R I get the
following error and so far have not been able to make sense of it.

test <- readGDAL("inputfile.bil", package="gdal")
inputfile.bil has GDAL driver EHdr
and has 516 rows and 813 columns
Error in getRasterData(x, offset = offset, region.dim = region.dim, ...) :
      unused argument(s) (package ...)

Any pointers would be gratefully accepted


Karl J Sommer

More information about the R-sig-Geo mailing list