calculate_cell_size function

Calculate size of grid items (deprecated).

Calculate size of grid items (deprecated).

Given an input multipolgyon spatial data frame this function calculates the required cell size of a regular or hexagonal grid.

calculate_cell_size( shape, shape_details = NULL, learning_rate = 0.03, grid_type = c("hexagonal", "regular"), seed = NULL, verbose = FALSE )

Arguments

  • shape: A 'SpatialPolygonsDataFrame' object representing the original spatial polygons.
  • shape_details: deprecated.
  • learning_rate: The rate at which the gradient descent finds the optimum cellsize to ensure that your gridded points fit within the outer boundary of the input polygons.
  • grid_type: Either 'hexagonal' for a hexagonal grid (default) or 'regular' for a regular grid.
  • seed: An optional random seed integer to be used for the grid calculation algorithm.
  • verbose: A logical indicating whether messages should be printed as the algorithm iterates.
  • Maintainer: Ryan Hafen
  • License: MIT + file LICENSE
  • Last published: 2023-08-19