create_grid: Create a grid of evenly spaced points to allow hexagons to...

Description Usage Arguments Value Examples

View source: R/create_grid.R

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

1
2
3
4
5
6
7
8
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

1
2
3
4
# Create a set of centroids for grid to overlay
centroids <- create_centroids(tas_lga, "LGA_CODE16")
# Create the grid
grid <- create_grid(centroids = centroids, hex_size = 0.2, buffer_dist = 1.2, verbose = FALSE)

sugarbag documentation built on Jan. 13, 2021, 10:11 a.m.