inla.nonconvex.hull {INLA} | R Documentation

## Nonconvex set extensions.

### Description

since `⁠23.08.18⁠`. Use `fmesher::fm_nonconvex_hull()` with argument `format = "fm"` instead, or no special argument to get `sf` output.

Constructs a nonconvex boundary for a point set using morphological operations.

### Usage

    inla.nonconvex.hull(
      points,
      convex = -0.15,
      concave = convex,
      resolution = 40,
      eps = NULL,
      crs = NULL
    )

    inla.nonconvex.hull.basic(
      points,
      convex = -0.15,
      resolution = 40,
      eps = NULL,
      crs = NULL
    )

### Arguments

`points` | 2D point coordinates (2-column matrix). Can alternatively be a `SpatialPoints` or `SpatialPointsDataFrame` object.
`convex` | The desired extension radius. Also determines the smallest allowed convex curvature radius. Negative values are interpreted as fractions of the approximate initial set diameter.
`concave` | The desired minimal concave curvature radius. Default is `concave=convex`.
`resolution` | The internal computation resolution. A warning will be issued when this needs to be increased for higher accuracy, with the required resolution stated.
`eps` | The polygonal curve simplification tolerance used for simplifying the resulting boundary curve. See `inla.simplify.curve()` for details.
`crs` | An optional `CRS` or `inla.CRS` object

### Details

Morphological dilation by `convex`, followed by closing by `concave`, with minimum concave curvature radius `concave`. If the dilated set has no gaps of width between

`2 convex (\sqrt{1+2 concave/convex} - 1)`

and `2 concave`, then the minimum convex curvature radius is `convex`. Special case `concave=0` delegates to `inla.nonconvex.hull.basic`

The implementation is based on the identity

`dilation(a) \& closing(b) = dilation(a+b) \& erosion(b)`

where all operations are with respect to disks with the specified radii.

### Value

An `fmesher::fm_segm()` object.

### Functions

- `inla.nonconvex.hull.basic()`: since `⁠23.08.18⁠` Use `fmesher::fm_nonconvex_hull()` with `concave = 0` instead.

### Note

Requires `nndistF` from the `splancs` package.

### Author(s)

Finn Lindgren finn.lindgren@gmail.com

### Examples

    if (require(splancs)) {
      loc <- matrix(runif(20), 10, 2)
      boundary <- inla.nonconvex.hull(loc, convex = 0.2)
      lines(boundary, add = FALSE)
      points(loc)
    }

[Package INLA version 26.08.22 Index]