Skip to contents

This function returns total number of H3 cells at a given resolution.

Usage

num_cells(res = NULL, fast = TRUE)

Arguments

res

Integer; Desired H3 resolution. See https://h3geo.org/docs/core-library/restable/ for allowable values and related dimensions.

fast

Logical; whether to retrieve values from a locally stored table or recalculate from source.

Value

Numeric; H3 cell count.

Note

Above resolution 8 the exact count cannot be represented in a JavaScript 32-bit number, so consumers should use caution when applying further operations to the output.

Examples

# Return cell count for resolution 8
num_cells(res = 8)
#> [1] 691776122