getPointsOutAlphaHull: Generate Spatial object from Alpha Hull object

View source: R/alphaHulls.R

getPointsOutAlphaHullR Documentation

Generate Spatial object from Alpha Hull object

Description

Generate polygon based on alpha hulls at a given alpha parmater

Usage

getPointsOutAlphaHull(
  x,
  alpha = 2,
  coordHeaders = c("Longitude", "Latitude"),
  proj = "+proj=longlat +datum=WGS84",
  verbose = FALSE,
  alphaCap = 20
)

Arguments

x

dataframe of coordinates in decimal degrees, with a minimum of 3 rows.

alpha

the starting value for alpha.

coordHeaders

the column names for the longitude and latitude columns, respectively. If x has two columns, these are assumed to be longitude and latitude, and coordHeaders is ignored.

proj

the projection information for x. The default is currently the only supported option.

verbose

logical. print messages? Default to FALSE

alphaCap

Max alpha value before function aborts and returns a minimum convex hull.

Details

Based on rangeBuilder::getDynamicRange without cropping to sea and without increments alpha = initialAlpha, and will then increase alpha by alphaIncrement until both the fraction and partCount conditions are met.

If the conditions cannot be satisfied, then a minimum convex hull is returned.

If clipToCoast is set to "terrestrial" or "aquatic", the resulting polygon is clipped to the coastline, using the dataset provided with this package.

Value

a list with 2 elements:

hull

a SpatialPolygons object

alpha

the alpha value that was found to satisfy the criteria. If a convex hull was returned, this will list MCH.

Author(s)

Pascal Title (original version), Josep M Serra-Diaz (modifs)

See Also

Alpha hulls are created with ahull.


occTest documentation built on Nov. 18, 2022, 5:07 p.m.