Tamara,

This suggests that 'rasterlayer' was created with an older version of the
raster package; saved to disk and then loaded again while using a newer
version of the package. It is better to use writeRaster/raster in stead of
save/load. You may be able to create a fresh object like this:

r <- raster(filename(rasterlayer))

Robert


On Tue, Sep 18, 2012 at 2:20 AM, Barry Rowlingson <
b.rowlingson@lancaster.ac.uk> wrote:

> On Tue, Sep 18, 2012 at 9:19 AM, Emmenegger Tamara
> <Tamara.Emmenegger@vogelwarte.ch> wrote:
> > Dear mailing list members,
> >
> > I'd like to extract raster values for the points in a
> SpatialPointsDataFrame.
> >
> >
> > raster::extract(rasterlayer,spdf[x,],method='simple')
> >
> > But I get the error message:
> >
> >
> > Fehler in .local(x, ...) :
> >
> >   kein Slot des Namens "blockrows" für dieses Objekt der Klasse
> ".RasterFile"
> >
> > Unfortunately I am unable to make head or tail of it. Any ideas what is
> going wrong?
>
>  Hard to tell without knowing where your 'rasterlayer' object has come
> from or what version of raster you are using or a basic knowledge of
> German...
>
>  If I create a raster object from a file and run str() on it, one of
> the slots is of class .RasterFile and has a slot called 'blockrows':
>
> > str(r)
> Formal class 'RasterLayer' [package "raster"] with 16 slots
>   ..@ file      :Formal class '.RasterFile' [package "raster"] with 11
> slots
>   .. .. ..@ name        : chr
> "/data/rowlings/Datasets/eea.europa.eu/CorineLandCover/cumbria.tif"
>   .. .. ..@ datanotation: chr "INT1U"
>   .. .. ..@ byteorder   : chr "little"
>   .. .. ..@ nodatavalue : num -Inf
>   .. .. ..@ nbands      : int 1
>   .. .. ..@ bandorder   : chr "BIL"
>   .. .. ..@ offset      : int 0
>   .. .. ..@ toptobottom : logi TRUE
>   .. .. ..@ blockrows   : int 28
>   .. .. ..@ blockcols   : int 285
>   .. .. ..@ driver      : chr "gdal"
>
> Somehow you have created something that doesn't have this... Where did
> it come from?
>
> Barry
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

	[[alternative HTML version deleted]]

