buffer_rectangle {buffeRs} | R Documentation |
Creates a rectangular polygon
buffer_rectangle(point, x_length, y_length, degree = 0)
point |
Centre point of the buffer, must equal to true in: |
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) |
An object of class sfc_POLYGON
Rotation function taken from Edzer Pebesma sf package vignette https://r-spatial.github.io/sf/articles/sf3.html
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)