Extracting information (x, y, value) for all cells in a line or polygon. Also, this function can be used to evaluate distances between objects or objects length.
fieldDraw(
mosaic,
line = TRUE,
ndraw = 1,
dist = FALSE,
distSel = 0.5,
round = 5,
value = 1,
pch = 16,
cex = 0.7,
col = "red",
lwd = 1
)
object mask of class stack from the function fieldMask
.
if it is TRUE the selected area will be a line otherwise it will be a polygon (line=FALSE).
number of drawings (lines or polygons).
if it is TRUE the distance among objects or objects length will be calculated
(mosaic should be the mask from function fieldMask
and line should be line=TRUE).
integer indicating which proportion of estimated distances should be selected (default 0.5).
If distSel = 1
all estimated distances will be saved. Some distances can be artifacts caused by the mask
estimation and can inflate the number of distances.
integer indicating the number of decimal places (round) or significant digits (signif) to be used.
integer indicating the value in the mask. If value=1 the objects length will be estimated.
If value = 0
the distance between objects will be estimated.
point symbol, please check help("points").
character (or symbol) expansion: a numerical vector, please check help("points").
color code or name, please check help("points").
line width, please check help("lines").
A list four elements
drawData
is a matrix with each cell position "x" and "y" (line/polygon) and the cell value "layer".
drawObject
is the the new SpatialPolygons
or SpatialLines
object.
drawSegments
is a simplified drawData matrix with segments defined in paramter "value".
drawDist
is the distance or length between objects.
fieldDraw