as.polygonal {spatstat} | R Documentation |
Given a window W
of any geometric type (rectangular,
polygonal or binary mask), this function returns a polygonal window
that represents the same spatial domain.
as.polygonal(W)
W |
A window (object of class |
Given a window W
of any geometric type (rectangular,
polygonal or binary mask), this function returns a polygonal window
that represents the same spatial domain.
If W
is already polygonal, it is returned without change.
If W
is a rectangle, it is converted to a polygon with
4 vertices.
If W
is a binary mask, then each pixel in the
mask is replaced by a small square or rectangle, and the union of these
squares or rectangles is computed. The result is a polygonal window
that has only horizontal and vertical edges.
(Use simplify.owin
to remove the staircase
appearance, if desired).
A polygonal window (object of class "owin"
and of type "polygonal"
).
Adrian Baddeley Adrian.Baddeley@csiro.au http://www.maths.uwa.edu.au/~adrian/ and Rolf Turner r.turner@auckland.ac.nz
owin
,
as.owin
,
as.mask
,
simplify.owin
data(letterR) m <- as.mask(letterR, dimyx=32) p <- as.polygonal(m) if(interactive()) { plot(m) plot(p, add=TRUE, lwd=2) }