[R-sig-Geo] R array to TIF

Christopher Swingley cswingle at gmail.com
Wed Feb 23 00:37:35 CET 2011


Oops.  I apparently didn't try the simplest thing:

raster <- readGDAL(path) # a 1000 x 1000 raster
raster$band1 <- array(data = 1, dim = 1000000)
writeGDAL(raster, fname = '/tmp/foo.tif', driver = 'GTiff', type =
'Byte', mvFlag = 255)

Cheers,

Chris
-- 
Christopher Swingley
Fairbanks, Alaska
http://swingleydev.com/
cswingle at gmail.com



More information about the R-sig-Geo mailing list