hexa_area: Polygon to Hexagonal Grid Tessellation

Description Usage Arguments Value See Also Examples

View source: R/grid_area.R

Description

The function takes a Simple Feature Polygon and a size argument and creates a list with an indexed matrix with coordinates and a Simple Feature object, that consists of hexagonal grids.

Usage

1
hexa_area(shape, size = 500, plotGrid = FALSE)

Arguments

shape

Simple Feature Polygon of the considered area

size

The cellsize of the grid in meters. Default is 500

plotGrid

Logical value indicating whether the results should be plotted. Default is FALSE

Value

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.

See Also

Other Helper Functions: dup_coords(), getDEM(), getISO3(), get_grids(), grid_area(), isSpatial(), permutations(), readintegerSel(), readinteger(), splitAt(), windata_format()

Examples

1
2
3
4
5
6
7
8
9
library(sf)
## Exemplary input Polygon with 2km x 2km:
Poly <- sf::st_as_sf(sf::st_sfc(
  sf::st_polygon(list(cbind(
    c(4498482, 4498482, 4499991, 4499991, 4498482),
    c(2668272, 2669343, 2669343, 2668272, 2668272)))), 
  crs = 3035
))
HexGrid <- hexa_area(Poly, 100, TRUE)

windfarmGA documentation built on May 5, 2021, 5:08 p.m.