buffer_square: A square Function

Description Usage Arguments Value Examples

View source: R/buffer_square.R

Description

Creates a square polygon, wrapper around buffer_rectangle(point, x_length = length, y_length = length, degree)

Usage

1
buffer_square(point, length, degree = 0)

Arguments

point

Centre point of the buffer, must equal to true in: sf::st_is(point, "POINT")

length

Length of the square sides, should be in the unit of projection (numeric)

degree

The angle at which the square is centred (clockwise). Must be between 0 and 360 (numeric)

Value

An object of class sfc_POLYGON

Examples

1
2
3
4
5
example_point = sf::st_point(c(1,2))
example_point = sf::st_sfc(example_point)
example_point = sf::st_sf(example_point)
buffer_square(example_point, 90, 22) -> square_shaped_buffer
plot(square_shaped_buffer)

buffeRs documentation built on Aug. 22, 2021, 9:07 a.m.