Skip to content

readGDAL or raster for reading bit map files

4 messages · Michael Sumner, Alaios

#
Just do

m <- as.matrix(store)

or

m <- as.image.SpatialGridDataFrame(store)$z

image(m)

They give the same result with different orientations.  Note that both
assume a single-band raster, e.g. you only have a "greyscale" bitmap
(for example).

The details behind all this is given in the documentation for the sp
package. See ?image for the basic image plot for a matrix.

Cheers, Mike.
On Thu, Nov 24, 2011 at 11:50 PM, Alaios <alaios at yahoo.com> wrote:

  
    
#
It is by magic, otherwise known as R classes and methods. See

sp:::as.matrix.SpatialGridDataFrame

There's a lot of background here so I suggest you start with the
general R documentation, and the sp package documentation, including

vignette("sp")

and these

citation("sp")

Cheers, Mike.
On Fri, Nov 25, 2011 at 1:49 AM, Alaios <alaios at yahoo.com> wrote: