[R-sig-Geo] Create raster data set using rgdal

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Sat Jun 1 10:11:30 CEST 2013


On Sat, Jun 1, 2013 at 6:41 AM, Lukas Lehnert
<lukaslehnert at googlemail.com> wrote:
> Thank you for the reply. I made a stupid mistake in the last post. I meant
> specifying number of bands, rows and columns in the newly created image (and
> not omitting). I know the raster package and the creation options. However I
> need to use rgdal and not the raster package for that purpose.

 Okay, I think we need to get this absolutely clear then...

 You want to create a file *on disk* - ie your primary interest is not
in creating an R object, but with creating a file on disk that some
other application could read.

 If so, why can't you use the raster package? It's what it's there for.

 Otherwise, purely using rgdal, you first create a
SpatialPixelsDataFrame and then save it with writeGDAL(). The
documentation is all there.

Barry



More information about the R-sig-Geo mailing list