View source: R/fct_fieldPolygon.R
fieldPolygon | R Documentation |
shapefile
with polygonsThe user should select points to make polygons in the image. Shapefile with polygons will be automatically built.
Attention: fieldRotate()
is not necessary.
fieldPolygon(
mosaic,
nPolygon = 1,
nPoint = 4,
polygonID = NULL,
polygonData = NULL,
ID = NULL,
cropPolygon = FALSE,
remove = FALSE,
plot = TRUE,
fast.plot = FALSE,
extent = FALSE
)
mosaic |
object of class stack. |
nPolygon |
number of polygons. |
nPoint |
number of points necessary to select field boundaries or area to remove (4 >= nPoint <= 50). |
polygonID |
a vector with polygon names with same order of drawing. If is NULL the ID will be the sequence of drawing. |
polygonData |
data frame with polygon ID and all attributes of each polygon (Traits as columns and polygon as rows). |
ID |
the column in polygonData with polygons names (ID) which the data will be combined with fieldShape. |
cropPolygon |
if TRUE the mosaic will be crooped using polygons shape. |
remove |
if TRUE the selected area will be removed from the image. |
plot |
if is TRUE the crop image and fieldShape will be plotted. |
fast.plot |
if TRUE only the grey scale image will be plotted as reference (faster approach). |
extent |
if is TRUE the entire image area will be the fieldShape (one unique plot). |
fieldPolygon
A list with two element
The function returns the fieldShape
format SpatialPolygonsDataFrame
with plots
numbered by the sequence of drawings and a new reduced image with format stack
.
The polygonID
parameter can be used to identify each polygon.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.