Learn R Programming

hexify (version 0.3.8)

hexify_grid_global: Generate a global grid of hexagon polygons

Description

Creates hexagon polygons covering the entire Earth.

Usage

hexify_grid_global(area, aperture = 3L, resround = "nearest")

Value

sf object with hexagon polygons covering the globe

Arguments

area

Target cell area in km^2

aperture

Grid aperture: 3, 4, or 7

resround

Resolution rounding: "nearest", "up", or "down"

See Also

grid_global for the recommended S4 interface, hexify_grid_rect for regional grids

Other sf conversion: hex_corners_to_sf(), hexify_cell_to_sf(), hexify_grid_rect()

Examples

Run this code
library(hexify)
library(sf)

# Coarse global grid (~100,000 km^2 cells)
global_grid <- hexify_grid_global(area = 100000)
plot(st_geometry(global_grid), border = "gray")

Run the code above in your browser using DataLab