spatstat (version 1.3-2)

bounding.box: Bounding Box of a Window

Description

Find the smallest rectangle containing a given window.

Usage

bounding.box(w)

Arguments

w
A window (object of class "owin").

Value

  • A window (object of class "owin") of type "rectangle" representing a rectangle.

Details

This function finds the smallest rectangle (with sides parallel to the coordinate axes) containing the window represented by w.

Use the function as.rectangle to extract the bounding window frame, which will be a larger rectangle.

See Also

owin, as.owin, as.rectangle

Examples

Run this code
library(spatstat)
  w <- owin(c(0,10),c(0,10), poly=list(x=c(1,2,3,2,1), y=c(2,3,4,6,7)))
  r <- bounding.box(w)
  # returns rectangle [1,3] x [2,7]

Run the code above in your browser using DataCamp Workspace