# area.owin

From spatstat v1.11-2
by Adrian Baddeley

##### Area of a Window

Computes the area of a window

##### Usage

`area.owin(w)`

##### Arguments

##### Details

If the window `W`

is of type `"rectangle"`

or `"polygonal"`

,
the area of this rectangular window is computed by analytic geometry.
If `W`

is of type `"mask"`

the area of the discrete raster approximation of the window is
computed by summing the binary image values and adjusting for
pixel size.

##### Value

- The numerical value of the area of the window.

##### See Also

##### Examples

```
w <- unit.square()
area.owin(w)
# returns 1.00000
k <- 6
theta <- 2 * pi * (0:(k-1))/k
co <- cos(theta)
si <- sin(theta)
mas <- owin(c(-1,1), c(-1,1), poly=list(x=co, y=si))
area.owin(mas)
# returns approx area of k-gon
mas <- as.mask(w, eps=0.01)
X <- raster.x(mas)
Y <- raster.y(mas)
mas$m <- ((X - 0.5)^2 + (Y - 0.5)^2 <= 1)
area.owin(mas)
# returns 3.14 approx
```

*Documentation reproduced from package spatstat, version 1.11-2, License: GPL version 2 or newer*

### Community examples

Looks like there are no examples yet.