grid_global: Generate a global hexagon grid

View source: R/grid_helpers.R

grid_globalR Documentation

Generate a global hexagon grid

Description

Creates hexagon polygons covering the entire Earth.

Usage

grid_global(grid, wrap_dateline = TRUE)

Arguments

grid

A HexGridInfo object specifying the grid parameters

wrap_dateline

Logical. If TRUE (default), antimeridian-crossing polygons are split at +/-180 degrees. Set to FALSE for orthographic/globe projections where wrapping creates gaps.

Details

This function generates a complete global grid by sampling points densely across the globe. For large grids (many small cells), consider using grid_rect() to generate regional subsets.

Value

sf object with hexagon polygons

See Also

grid_rect for regional grids

Examples

# Coarse global grid
grid <- hex_grid(area_km2 = 100000)
global <- grid_global(grid)
plot(global)

hexify documentation built on March 1, 2026, 1:07 a.m.