Called from within create_grid function, this function takes the bounding box of a group of polygons, or a specific table of minimum and maximum longitudes and latitudes to create points for each polygon to be allocated to that will tessellate into hexagons.

create_buffer(centroids, grid, hex_size, buffer_dist, verbose = FALSE)

Arguments

centroids

data frame of centroids to be allocated

grid

data frame of hexagon centroids

hex_size

a float value in degrees for the diameter of the hexagons

buffer_dist

distance to extend beyond the geometry provided

verbose

a boolean to indicate whether to show function progress

Value

data frame of hexagon centroids

Examples

lga_centroids <- create_centroids(sugarbag::tas_lga, "lga_code_2016")
lga_grid <- create_grid(lga_centroids, hex_size = 0.2, buffer_dist = 1.2)