fieldPolygon: Building 'shapefile' with polygons

View source: R/fct_fieldPolygon.R

fieldPolygonR Documentation

Building shapefile with polygons

Description

The user should select points to make polygons in the image. Shapefile with polygons will be automatically built. Attention: fieldRotate() is not necessary.

Usage

fieldPolygon(
  mosaic,
  nPolygon = 1,
  nPoint = 4,
  polygonID = NULL,
  polygonData = NULL,
  ID = NULL,
  cropPolygon = FALSE,
  remove = FALSE,
  plot = TRUE,
  fast.plot = FALSE,
  extent = FALSE
)

Arguments

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

Details

fieldPolygon

Value

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.


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