[R-sig-Geo] R array to TIF

Christopher Swingley cswingle at gmail.com
Wed Feb 23 00:27:18 CET 2011


I'm reading in a bunch of TIF images that all have the same extent
using rgdal::readGDAL, and then aggregating the stack of $band1 data
by applying a function to the vector of image data at each pixel.  The
result is an R array.  I want to write out this array as a TIF image
with the same parameters (rows, columns, bounding box, projection,
etc.), but I haven't found the trick to creating a
SpatialGridDataFrame so I can use writeGDAL.  I'm also curious about
how one might change the data type (Byte, Int16, etc.) and nodata
value when dumping it out.


Christopher Swingley
Fairbanks, Alaska
cswingle at gmail.com

More information about the R-sig-Geo mailing list