Skip to content
Back to formatted view

Raw Message

Message-ID: <AANLkTi=xbTzu_8gvj3fkb7e+n-SgcufgdxUp-6m=6iR+@mail.gmail.com>
Date: 2011-02-22T23:27:18Z
From: Christopher Swingley
Subject: R array to TIF

Greetings!

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.

Thanks!

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