\HeaderA{bbox-methods}{retrieve bbox from spatial data}{bbox.Rdash.methods}
\aliasA{bbox}{bbox-methods}{bbox}
\aliasA{bbox,Line-method}{bbox-methods}{bbox,Line.Rdash.method}
\aliasA{bbox,Lines-method}{bbox-methods}{bbox,Lines.Rdash.method}
\aliasA{bbox,Polygon-method}{bbox-methods}{bbox,Polygon.Rdash.method}
\aliasA{bbox,Polygons-method}{bbox-methods}{bbox,Polygons.Rdash.method}
\aliasA{bbox,Spatial-method}{bbox-methods}{bbox,Spatial.Rdash.method}
\keyword{methods}{bbox-methods}
\begin{Description}\relax
retrieves spatial bounding box from spatial data
\end{Description}
\begin{Usage}
\begin{verbatim}
        bbox(obj)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{obj}] object deriving from class "Spatial", or one of classes: "Line", "Lines", "Polygon" or "Polygons" 
\end{ldescription}
\end{Arguments}
\begin{Value}
two-column matrix; the first column has the minimum,
the second the maximum values; rows represent the spatial
dimensions
\end{Value}
\begin{Section}{Methods}
\describe{
\item[obj = "Spatial"] object deriviving from class "Spatial" 
\item[obj = "Line"] object deriviving from class "Line" 
\item[obj = "Lines"] object deriviving from class "Lines" 
\item[obj = "Polygon"] object deriviving from class "Polygon" 
\item[obj = "Polygons"] object deriviving from class "Polygons" 
}
\end{Section}
\begin{Examples}
\begin{ExampleCode}
# 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)

\end{ExampleCode}
\end{Examples}

