nemo_hull: Computes the concave polygon for a set of points

Description Usage Arguments Value Examples

View source: R/nemo_hull.R

Description

Uses the 'concaveman' function from [concaveman](https://github.com/mapbox/concaveman) and [concaveman in R](https://github.com/joelgombin/concaveman))

Usage

1
nemo_hull(points, group_hull, concavity, length_threshold)

Arguments

points

points for which the concave hull must be computed (an 'sf' object).

concavity

a relative measure of concavity. 1 results in a relatively detailed shape, Infinity results in a convex hull. You can use values lower than 1, but they can produce pretty crazy shapes.

length_threshold

when a segment length is under this threshold, it stops being considered for further detalization. Higher values result in simpler shapes.

group

optional : a field which splits the hull (a field of the 'sf' object).

Value

an 'sf' object.

Examples

1
2
3
4
5
6
data(points)
hull_pts <-
nemo_hull(points = points %>% st_transform(2154),
           #group_hull = k,
           concavity =2,
           length_threshold = 10)

mtmx/nemo documentation built on Nov. 4, 2019, 8:31 p.m.