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

vertices

Vertices of a Window


Description

Finds the vertices of a window, or similar object.

Usage

vertices(w)

 ## S3 method for class 'owin'
vertices(w)

Arguments

w

A window (object of class "owin") or similar object.

Details

This function computes the vertices (‘corners’) of a spatial window or other object.

For vertices.owin, the argument w should be a window (an object of class "owin", see owin.object for details).

If w is a rectangle, the coordinates of the four corner points are returned.

If w is a polygonal window (consisting of one or more polygons), the coordinates of the vertices of all polygons are returned.

If w is a binary mask, then a ‘boundary pixel’ is defined to be a pixel inside the window which has at least one neighbour outside the window. The coordinates of the centres of all boundary pixels are returned.

Value

A list with components x and y giving the coordinates of the vertices.

Author(s)

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

See Also

Examples

vert <- vertices(letterR)

  plot(letterR, main="Polygonal vertices")
  points(vert)
  plot(letterR, main="Boundary pixels")
  points(vertices(as.mask(letterR)))

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.