Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

intersect.tess

Intersection of Two Tessellations


Description

Yields the intersection of two tessellations, or the intersection of a tessellation with a window.

Usage

intersect.tess(X, Y, ..., keepmarks=FALSE, sep="x")

Arguments

X,Y

Two tessellations (objects of class "tess"), or windows (objects of class "tess"), or other data that can be converted to tessellations by as.tess.

...

Optional arguments passed to as.mask to control the discretisation, if required.

keepmarks

Logical value. If TRUE, the marks attached to the tiles of X and Y will be retained as marks of the intersection tiles.

sep

Character string used to separate the names of tiles from X and from Y, when forming the name of the tiles of the intersection.

Details

A tessellation is a collection of disjoint spatial regions (called tiles) that fit together to form a larger spatial region. See tess.

If X and Y are not tessellations, they are first converted into tessellations by as.tess.

The function intersect.tess then computes the intersection between the two tessellations. This is another tessellation, each of whose tiles is the intersection of a tile from X and a tile from Y.

One possible use of this function is to slice a window W into subwindows determined by a tessellation. See the Examples.

Value

A tessellation (object of class "tess").

Author(s)

and Rolf Turner r.turner@auckland.ac.nz

See Also

Examples

opa <- par(mfrow=c(1,3))
# polygon
  plot(letterR)
# tessellation of rectangles
  X <- tess(xgrid=seq(2, 4, length=10), ygrid=seq(0, 3.5, length=8))
  plot(X)
  plot(intersect.tess(X, letterR))

  A <- runifrect(10)
  B <- runifrect(10)
  plot(DA <- dirichlet(A))
  plot(DB <- dirichlet(B))
  plot(intersect.tess(DA, DB))
  par(opa)

  marks(DA) <- 1:10
  marks(DB) <- 1:10
  plot(Z <- intersect.tess(DA,DB, keepmarks=TRUE))
  mZ <- marks(Z)
  tZ <- tiles(Z)
  for(i in which(mZ[,1] == 3)) plot(tZ[[i]], add=TRUE, col="pink")

spatstat.geom

Geometrical Functionality of the 'spatstat' Family

v2.1-0
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Tilman Davies [ctb], Ute Hahn [ctb], Abdollah Jalilian [ctb], Sebastian Meyer [ctb], Suman Rakshit [ctb], Dominic Schuhmacher [ctb], Rasmus Waagepetersen [ctb]
Initial release
2021-04-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.