Further arguments passed to
as.data.frame.default
to determine the row names and other features.
drop
Logical value indicating whether to discard pixels that are
outside the window, when x is a binary mask.
Value
A data frame with columns named x and y,
and possibly other columns.
Details
This function returns a data frame specifying the coordinates of the
window.
If x is a binary mask window,
the result is a data frame with columns x and y
containing the spatial coordinates of each pixel.
If drop=TRUE (the default), only pixels inside the window are retained.
If drop=FALSE, all pixels are retained, and the data frame has
an extra column inside containing the logical value of each pixel
(TRUE for pixels inside the window, FALSE for outside).
If x is a rectangle or a polygonal window,
the result is a data frame with columns x and y
containing the spatial coordinates of the vertices of the
window. If the boundary consists of several polygons, the data frame
has additional columns id, identifying which polygon is being
traced, and sign, indicating whether the polygon is an
outer or inner boundary (sign=1 and sign=-1 respectively).