buffer_rectangle {buffeRs}R Documentation

A rectangle Function

Description

Creates a rectangular polygon

Usage

buffer_rectangle(point, x_length, y_length, degree = 0)

Arguments

point

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

x_length

Length of the x-side (horizontal side), should be in the unit of projection (numeric)

y_length

Length of the y-side (vertical side), should be in the unit of projection (numeric)

degree

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

Value

An object of class sfc_POLYGON

References

Rotation function taken from Edzer Pebesma sf package vignette https://r-spatial.github.io/sf/articles/sf3.html

Examples

example_point = sf::st_point(c(1,2))
example_point = sf::st_sfc(example_point)
example_point = sf::st_sf(example_point)
buffer_rectangle(example_point, 200, 90, 22) -> rectangular_shaped_buffer
plot(rectangular_shaped_buffer)

[Package buffeRs version 0.30 Index]