Learn R Programming

spatstat.geom (version 3.3-2)

bufftess: Buffer Distance Tessellation

Description

Constructs a spatial tessellation, composed of rings or buffers at specified distances away from the given spatial object.

Usage

bufftess(X, breaks, W = Window(X), ..., polygonal = TRUE)

Value

A tessellation (object of class "tess").

The result also has an attribute breaks which is the vector of distance breakpoints.

Arguments

X

A spatial object in two dimensions, such as a point pattern (class "ppp") or line segment pattern (class "psp").

breaks

Either a numeric vector specifying the cut points for the distance values, or a single integer specifying the number of cut points.

W

Optional. Window (object of class "owin") inside which the tessellation will be constructed.

...

Optional arguments passed to as.mask controlling the pixel resolution when polygonal=FALSE, and optional arguments passed to cut.default controlling the labelling of the distance bands.

polygonal

Logical value specifying whether the tessellation should consist of polygonal tiles (polygonal=TRUE, the default) or should be constructed using a pixel image (polygonal=FALSE).

Author

Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner rolfturner@posteo.net and Ege Rubak rubak@math.aau.dk.

Details

This function divides space into tiles defined by distance from the object X. The result is a tessellation (object of class "tess") that consists of concentric rings around X.

The distance values which determine the tiles are specified by the argument breaks.

  • If breaks is a vector of numerical values, then these values are taken to be the distances defining the tiles. The first tile is the region of space that lies at distances between breaks[1] and breaks[2] away from X; the second tile is the region lying at distances between breaks[2] and breaks[3] away from X; and so on. The number of tiles will be length(breaks)-1.

  • If breaks is a single integer, it is interpreted as specifying the number of intervals between breakpoints. There will be breaks+1 equally spaced break points, ranging from zero to the maximum achievable distance. The number of tiles will equal breaks.

The tessellation can be computed using either raster calculations or vector calculations.

  • If polygonal=TRUE (the default), the tiles are computed as polygonal windows using vector geometry, and the result is a tessellation consisting of polygonal tiles. This calculation could be slow and could require substantial memory, but produces a geometrically accurate result.

  • If polygonal=FALSE, the distance map of X is computed as a pixel image (distmap), then the distance values are divided into discrete bands using cut.im. The result is a tessellation specified by a pixel image. This computation is faster but less accurate.

See Also

Polygonal calculations are performed using dilation and setminus.owin. Pixel calculations are performed using distmap and cut.im. See as.mask for details of arguments that control pixel resolution.

For other kinds of tessellations, see tess, hextess, venn.tess, polartess, dirichlet, delaunay, quantess, quadrats and rpoislinetess.

Examples

Run this code
  X <- cells[c(FALSE,FALSE,FALSE,TRUE)]
  if(interactive()) {
    b <- c(0, 0.05, 0.1, 0.15, 0.2, Inf)
    n <- 5
  } else {
    ## simpler data for testing
    b <- c(0, 0.1, 0.2, Inf)
    n <- 3
  }
  plot(bufftess(X, b), do.col=TRUE, col=1:n)

Run the code above in your browser using DataLab