Learn R Programming

spatstat.geom (version 3.7-0)

tile.centroids: Compute Centroids of Tiles in a Tessellation

Description

Finds the centroid of each tile in a tessellation and returns them as a point pattern.

Usage

tile.centroids(x)

Value

A point pattern (object of class "ppp").

Arguments

x

A tessellation (object of class "tess").

Author

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

Details

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

This command determines the centroid of each of the tiles that make up the tessellation x using centroid.owin. The result is a point pattern containing the centroids, listed in the same order as the tiles would be listed by tiles(x).

See Also

tess, tile.areas

Examples

Run this code
  A <- tess(xgrid=0:2,ygrid=0:2)
  plot(A, main="")
  plot(tile.centroids(A), add=TRUE)
  D <- dirichlet(runifrect(6))
  plot(D)
  plot(tile.centroids(D), add=TRUE)

Run the code above in your browser using DataLab