cellsFromExtent.Rd
cellsFromExtent returns the cell numbers for a Raster* object that are within a specfied extent (rectangular area), supply an object of class Extent, or another Raster* object.
extentFromCells returns an Extent object from a Raster* object and cell numbers. All cells are within the returned Extent.
cellsFromExtent(object, extent, expand=FALSE)
extentFromCells(object, cells)
A Raster* object
An object of class Extent (which you can create with newExtent(), or another Raster* object )
Logical. If TRUE
, NA
is returned for (virtual) cells implied by bndbox
,
that are outside the RasterLayer (object
). If FALSE
, only cell numbers for the area where object
and bndbox
overlap are returned (see intersect)
numeric. A vector of cell numbers
a vector of cell numbers