| grid_area | R Documentation |
Create a grid from a given polygon with a certain resolution and proportionality. The grid cell centroids represent possible wind turbine locations.
grid_area(area, size = 500, prop = 1, plot_grid = FALSE)
area |
Simple Feature polygon of the site |
size |
Cell size of the grid in metres |
prop |
Minimum fraction of a cell that must overlap the site |
plot_grid |
Draw the grid |
Returns a list with 2 elements. List element 1 will have the grid cell IDS, and the X and Y coordinates of the centers of each grid cell. List element 2 is the grid as Simple Feature Polygons, which is used for plotting purposes.
The grid of the genetic algorithm will have a resolution of
rotor * fcr. See the arguments of genetic_algorithm().
Other Helper Functions:
get_grids(),
hexa_area(),
isSpatial(),
permutations(),
read_power_curve(),
splitAt(),
wind_from_series(),
wind_from_uv(),
windata_format()
## Exemplary input Polygon with 2km x 2km:
library(sf)
area <- sf::st_as_sf(sf::st_sfc(
sf::st_polygon(list(cbind(
c(0, 0, 2000, 2000, 0),
c(0, 2000, 2000, 0, 0)
))),
crs = 3035
))
## Create a Grid
grid_area(area, 200, 1, TRUE)
grid_area(area, 400, 1, TRUE)
## Examplary irregular input Polygon
area <- sf::st_as_sf(sf::st_sfc(
sf::st_polygon(list(cbind(
c(0, 0, 2000, 3000, 0),
c(20, 200, 2000, 0, 20)
))),
crs = 3035
))
## Create a Grid
grid_area(area, 200, 1, TRUE)
grid_area(area, 200, 0.1, TRUE)
grid_area(area, 400, 1, TRUE)
grid_area(area, 400, 0.1, TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.