Debian Codegraph @

man/bbox.Rd

raw
1 \name{bbox-methods}
2 \docType{methods}
3 \alias{bbox,Spatial-method}
4 \alias{bbox,ANY-method}
5 \alias{bbox,Line-method}
6 \alias{bbox,Lines-method}
7 \alias{bbox,Polygon-method}
8 \alias{bbox,Polygons-method}
9 \alias{bbox}
10 \title{ retrieve bbox from spatial data}
11 \description{
12 retrieves spatial bounding box from spatial data
13 }
14 \usage{
15 bbox(obj)
16 }
17 \arguments{
18 \item{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 }
19 }
20 \section{Methods}{
21 \describe{
22 \item{obj = "Spatial"}{ object deriving from class "Spatial" }
23 \item{obj = "ANY"}{ an array with at least two columns }
24 \item{obj = "Line"}{ object deriving from class "Line" }
25 \item{obj = "Lines"}{ object deriving from class "Lines" }
26 \item{obj = "Polygon"}{ object deriving from class "Polygon" }
27 \item{obj = "Polygons"}{ object deriving from class "Polygons" }
28 }}
29 \value{ two-column matrix; the first column has the minimum,
30 the second the maximum values; rows represent the spatial
31 dimensions}
32 \keyword{methods}
33 \examples{
34 # just 9 points on a grid:
35 x <- c(1,1,1,2,2,2,3,3,3)
36 y <- c(1,2,3,1,2,3,1,2,3)
37 xy <- cbind(x,y)
38 S <- SpatialPoints(xy)
39 bbox(S)
40
41 # data.frame
42 data(meuse.grid)
43 coordinates(meuse.grid) <- ~x+y
44 gridded(meuse.grid) <- TRUE
45 bbox(meuse.grid)
46
47 }
48 \keyword{spatial}