Steven,
Not that I can think of. Something for the to-do list.
Below is how you could make a RasterBrick (which should be preferable
to a RasterStack for objects created in memory (and otherwise their
behavior is similar to a RasterStack).
globe<-brick(nrows=36, ncols=72)
id <- data.frame(cell=1
Or perhaps:
r <- mask(r, mask)
v <- data.frame( rasterToPoints(r)[ , 3] )
# equivalent to
# v <- data.frame( na.omit( getValues(r) ) )
Robert
On Fri, Jul 9, 2010 at 2:00 PM, Jacob van Etten wrote:
> You might try cellValues().
> Argument "cells" should be the indices of the non-masked cells.
>
Francisco,
You have not said why you want to read the image into memory, but
chances are that you do not need to, if you use the 'raster' package
to explore or manipulate your data.
Robert
On Fri, Jul 9, 2010 at 12:31 PM, Barry Rowlingson
wrote:
> On Fri, Jul 9, 2010 at 7:58 PM, Francisco Mauro
Assuming I have a matrix of Nrows and Mcols where
Column #1 is filled with a valid cell number for a raster. ALL cell numbers
will not
be present.
Subsequent columns (2-M) contain the data that I want to place in a sequence
of
layers, so that in the end I have a rasterStack of M layers. M can
You might try cellValues().
Argument "cells" should be the indices of
the non-masked cells.
Something like this:
cellInd <-
which(getValues(r1) != mask.value)
valueVector <- cellValues(r2,
cells = cellInd)
Jacob.
--- On Fri, 9/7/10, Jonathan Greenberg wrote:
From: Jonathan Greenberg
Subje
On Fri, Jul 9, 2010 at 7:58 PM, Francisco Mauro Gutiérrez
wrote:
> My problem is that R provides an Error message saying that it is not
> possible to allocate a vector of 650 Mb. Does anyone now how can I increase
> the memory limit? It looks like I should increase it to be able to read the
> ima
Dear List,
Im trying to read a Landsat product in tif format with rgdal. The image
size is :
NDVIMULTITEMPMASK.tif has GDAL driver GTiff
and has 5386 rows and 5507 columns
and it has 5 bands.
My problem is that R provides an Error message saying that it is not
possible to a
r-sig-geo'ers and Robert:
If I want to pull out the values of a raster into a dataframe,
ignoring "masked" values, what is the quickest way to do this? I can
use getValues() and "post-process" the output, but is there a way to
skip every loading these masked values into a memory in the first
plac
Do spatial polygon data frames have an equivalent of subscripting for
data frames? Or perhaps a way to call variables akin to the get() command?
I'd like to be able to write apply() functions over the variables in a
spatial polygons data frame, so that I can automate the generation of plots.