Description Usage Arguments Value References Examples
View source: R/buffer_rectangle.R
Creates a rectangular polygon
1 | 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
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_rectangle(example_point, 200, 90, 22) -> rectangular_shaped_buffer
plot(rectangular_shaped_buffer)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.