R/create_grid.R
create_grid.Rd
This function takes the output from the create_centroids function, or a set of centroids in a table with the columns latitude and longitude
create_grid(
centroids,
hex_size,
buffer_dist,
latitude = "latitude",
longitude = "longitude",
verbose = FALSE
)
data frame of centroids to be allocated, this should have columns for longitude and latitude value of centroids, as
a float value in degrees for the diameter of the hexagons
distance to extend beyond the geometry provided
the column name for the latitude values of the centroids
the column name for the longitude values of the centroids
a boolean to indicate whether to show function progress
grid
# Create a set of centroids for grid to overlay
centroids <- create_centroids(tas_lga, "lga_code_2016")
# Create the grid
grid <- create_grid(centroids = centroids, hex_size = 0.2, buffer_dist = 1.2, verbose = FALSE)