bbox-methods

0th

Percentile

retrieve bbox from spatial data

retrieves spatial bounding box from spatial data

Keywords
methods, spatial
Usage
bbox(obj)
Arguments
obj
object deriving from class "Spatial", or one of classes: "Line", "Lines", "Polygon" or "Polygons", or ANY, which requires obj to be an array with at least two columns
Value

  • two-column matrix; the first column has the minimum, the second the maximum values; rows represent the spatial dimensions

Aliases
  • bbox,Spatial-method
  • bbox,ANY-method
  • bbox,Line-method
  • bbox,Lines-method
  • bbox,Polygon-method
  • bbox,Polygons-method
  • bbox
Examples
# just 9 points on a grid:
x <- c(1,1,1,2,2,2,3,3,3)
y <- c(1,2,3,1,2,3,1,2,3)
xy <- cbind(x,y)
S <- SpatialPoints(xy)
bbox(S)

# data.frame
data(meuse.grid)
coordinates(meuse.grid) <- ~x+y
gridded(meuse.grid) <- TRUE
bbox(meuse.grid)
Documentation reproduced from package sp, version 0.9-94, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.