basic_random_polygon: basic random polygon

Description Usage Arguments Value Examples

Description

This function draws a set of random polygons.

Usage

1
basic_random_polygon(polygon, size, number, nSides, sm = T, ...)

Arguments

polygon

A Simple Feature polygon or just a "sfc_MULTIPOLYGON" or "sfc_POLYGON" geometry.

size

percentage of output area relative to input area

number

number of polygons

nSides

number of polygon sides

sm

smooth by the smooth function

...

is passed to function smooth

Value

A unit multipolygon Simple Feature with one parID column

Examples

1
2
3
4
5
6
7
8
9
poly_example <- sf::st_sfc(sf::st_polygon(list(matrix(c(0,0,10,0,10,10,0,10,0,0),
ncol=2, byrow=TRUE))))

poly_example1 <- basic_random_polygon(polygon = poly_example, 
                                      size = .3, 
                                      number = 30,
                                      nSides = 5, sm = TRUE)
plot(poly_example)
plot(poly_example1$geometry, add = TRUE, col = "brown")

nardusstricta/soilprofile2 documentation built on May 23, 2019, 6:04 p.m.