setExtent.Rd
setExtent sets the extent of a Raster* object. Either by providing a new Extent object or by setting the extreme coordinates one by one.
setExtent(x, ext, keepres=FALSE, snap=FALSE)
extent(x) <- value
A Raster* object
An object of class Extent (which you can create with extent
, or an object that has an extent (e.g. a Raster* or Spatial* object) )
logical. If TRUE
, the resolution of the cells will stay the same after adjusting the bounding box (by adjusting the number of rows and columns).
If FALSE
, the number of rows and columns will stay the same, and the resolution will be adjusted.
logical. If TRUE
, the extent is adjusted so that the cells of the input and output RasterLayer are aligned
An object of class Extent (which you can create with extent
)
a Raster* object