Skip to content
Prev 10083 / 29559 Next

get() in raster ?

Works for stack and not for brick:
[1] FALSE
class       : RasterStack
nlayers     : 3
nrow        : 1905
ncol        : 3697
ncell       : 7042785
projection  : +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +towgs84=0,0,0
min value   : 0 0 0
max value   : 255 255 255
extent      : -80.00446, -46.99554, -13.00446, 4.004464  (xmin, xmax,
ymin, ymax)
resolution  : 0.008928571, 0.008928571  (x, y)
Error in as.matrix(getValues(r)) :
  error in evaluating the argument 'x' in selecting a method for
function 'as.matrix'
Calls: do.call ... <Anonymous> -> addLayer -> addLayer -> .local -> as.matrix
Error in .readRasterLayerValues(x, 1, x at nrows) :
  could not find function "GDAL.open"
Calls: brick ... getValues -> getValues -> .local -> .readRasterLayerValues


Agus

2010/11/22 Robert J. Hijmans <r.hijmans at gmail.com>: