get_h3_grid: Generate an H3 Hexagonal Grid for an sf Object
Description
Generates a hexagonal grid of H3 cells at a specified resolution
that intersect with a given `sf` object. This is a wrapper for
functions from the h3jsr package.
(sf) An sf object containing the hexagonal grid polygons
covering the input area. Each polygon represents an H3 cell at the specified
resolution, with a column containing the H3 index.
Arguments
sf_object
(sf) An sf object defining the area of interest.
Must have a valid coordinate reference system (CRS).
resolution
(integer) H3 resolution level (1–16). Default is 6.
Lower values produce fewer, larger hexagons (faster processing, coarser grid).
expand_factor
(numeric) Expands bounding box to ensure coverage.
Default is 0.1.
Details
Reducing the resolution (e.g., 5 or 6) can greatly reduce processing time and memory
usage, especially for large AOIs. Each decrease in resolution increases the size of
individual hexagons exponentially.