fieldDraw: Making draws (lines or polygons)

View source: R/fct_fieldDraw.R

fieldDrawR Documentation

Making draws (lines or polygons)

Description

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.

Usage

fieldDraw(
  mosaic,
  line = TRUE,
  ndraw = 1,
  dist = FALSE,
  distSel = 0.5,
  round = 5,
  value = 1,
  pch = 16,
  cex = 0.7,
  col = "red",
  lwd = 1
)

Arguments

mosaic

object mask of class stack from the function fieldMask.

line

if it is TRUE the selected area will be a line otherwise it will be a polygon (line=FALSE).

ndraw

number of drawings (lines or polygons).

dist

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).

distSel

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.

round

integer indicating the number of decimal places (round) or significant digits (signif) to be used.

value

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.

pch

point symbol, please check help("points").

cex

character (or symbol) expansion: a numerical vector, please check help("points").

col

color code or name, please check help("points").

lwd

line width, please check help("lines").

Details

fieldDraw

Value

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.


OpenDroneMap/FIELDimageR documentation built on May 4, 2024, 4:24 a.m.