create_grid {sugarbag} | R Documentation |
Create a grid of evenly spaced points to allow hexagons to tessellate
Description
This function takes the output from the create_centroids function, or a set of centroids in a table with the columns latitude and longitude
Usage
create_grid(
centroids,
hex_size,
buffer_dist,
latitude = "latitude",
longitude = "longitude",
verbose = FALSE
)
Arguments
centroids |
data frame of centroids to be allocated, this should have columns for longitude and latitude value of centroids, as |
hex_size |
a float value in degrees for the diameter of the hexagons |
buffer_dist |
distance to extend beyond the geometry provided |
latitude |
the column name for the latitude values of the centroids |
longitude |
the column name for the longitude values of the centroids |
verbose |
a boolean to indicate whether to show function progress |
Value
grid
Examples
# 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)
[Package sugarbag version 0.1.6 Index]