extent

0th

Percentile

Extent

This function returns an Extent object of a Raster* or Spatial* object (or an Extent object), or creates an Extent object from a matrix (2x2; rows=minx, maxx; cols=miny, maxy) or vector (length=4; order= xmin, xmax, ymin, ymax) bbox(x) returns a sp package like 'bbox' object (a matrix)

Keywords
spatial
Usage
extent(x, ...)
Arguments
x
A Raster* or Extent object, a matrix, or four numbers
...
Additional arguments. Only used when x is numeric (to pass three additional numerics)
Value

  • An Extent object

See Also

extent, drawExtent

Aliases
  • extent
  • extent,Extent-method
  • extent,BasicRaster-method
  • extent,Spatial-method
  • extent,matrix-method
  • extent,numeric-method
  • bbox,Raster-method
Examples
r <- raster()
extent(r)
extent(c(0, 20, 0, 20))
#is equivalent to
extent(0, 20, 0, 20)
extent(matrix(c(0, 0, 20, 20), nrow=2))
Documentation reproduced from package raster, version 1.0.0-1, License: GPL (>= 3)

Community examples

Looks like there are no examples yet.