poly_metrics: calculate morphometric features of polygons.

Description Usage Arguments Value See Also Examples

View source: R/fa_crownmetrics.R

Description

calculate morphometric features of polygons. Calculate some crown related metrics, returns the metrics as a spatialpointdataframe/spatialpolygondataframe

Usage

1
2
3
4
5
poly_metrics(
  crownarea,
  funNames = c("length", "elongation", "eccentricityboundingbox", "solidity",
    "eccentricityeigen", "calliper", "rectangularity", "circularityharalick", "convexity")
)

Arguments

crownarea

sp* spatialpolygon object

funNames

character. names of morphometrics to be calculated available are ("length","elongation","eccentricityboundingbox","solidity","eccentricityeigen", "calliper","rectangularity","circularityharalick","convexity")

Value

sp* object

See Also

Momocs Paul Rosin

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
# required packages
require(uavRst)
require(mapview)

# get the rgb image, chm and training data
utils::download.file("https://github.com/gisma/gismaData/raw/master/uavRst/data/tutorial_data.zip",
                      paste0(tempdir(),"tutorial_data.zip"))
unzip(zipfile = paste0(tempdir(),"tutorial_data.zip"), exdir = tempdir())
crown<-raster::shapefile(paste0(tempdir(),"rgb_3-3_train2.shp"))
## calculate polygon morpho metrics
polymetric <- poly_metrics(crown)

# visualize it
mapview::mapview(polymetric)
##+
## End(Not run)

uavRst documentation built on Dec. 30, 2019, 5:06 p.m.