bounding.box {spatstat}R Documentation

Bounding Box of a Window

Description

Find the smallest rectangle containing a given window(s)

Usage

 bounding.box(...)

Arguments

... One or more windows (objects of class "owin").

Details

If the argument is a single window object w, this function finds the smallest rectangle (with sides parallel to the coordinate axes) containing w.

If the argument is a list of windows, then this function finds the smallest rectangle that contains all of the windows.

Note that the bounding box of a window w is usually smaller than the window frame (determined by w$xrange and w$yrange and extracted by as.rectangle).

Value

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

Author(s)

Adrian Baddeley adrian@maths.uwa.edu.au http://www.maths.uwa.edu.au/~adrian/ and Rolf Turner rolf@math.unb.ca http://www.math.unb.ca/~rolf

See Also

owin, as.owin, as.rectangle

Examples

  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]

  w2 <- unit.square()
  r <- bounding.box(w, w2)
  # returns rectangle [0,3] x [0,7]

[Package spatstat version 1.10-3 Index]