Create a Spatial Sampling Grid

make_spatial_grid(
  dir.out,
  overwrite = TRUE,
  countries = c("US", "CA"),
  states = NULL,
  crs.target = 4326,
  hexagonal = TRUE,
  grid.size = 1,
  conterminousUSA = TRUE,
  ...
)

Arguments

dir.out

Where to save the resulting grid (as .RDS).

overwrite

TRUE will overwrite existing grid.rds in dir.out

countries

Vector of countries. Defaults to a base map of USA and CAN, unless arg states is provided. If arg states is provided, this argument will be ignored. Must be specified using ISO-A2

states

Vector of states to which the spatial grid will be clipped. Must be specified using ISO 3166-2 (see https://en.wikipedia.org/wiki/ISO_3166-2)

crs.target

Target CRS number for spatial grid.

hexagonal

logical if TRUE will produce a spatial grid with hexagonal, as opposed to rectangular, cells

grid.size

numeric size (relative to units defining crs.target) of resulting cell. E.g., if crs.target==4326 a value of gridsize=1.0 equals ~111.11km

conterminousUSA

logical if TRUE will remove Hawaii and Alaska. Default TRUE to reduce computation times and extent of sptaial grid.

...

Additional arguments