inspection: H3 Inspection Functions

h3_resolutionR Documentation

H3 Inspection Functions

Description

Functions that provide metadata about H3 indexes.

Usage

h3_resolution(x)

h3_base_cell(x)

is_valid_h3(x)

is_res_class_iii(x)

is_pentagon(x)

get_face_count(x)

Arguments

x

an H3 vector.

Details

  • h3_resolution(): returns the resolution of each H3 cell.

  • h3_base_cell(): returns the base cell integer.

  • is_valid_h3(): given a vector of H3 index string IDs, determine if they are valid.

  • is_res_class_iii(): determines if an H3 cell has Class III orientation.

  • is_pentagon(): determines if an H3 cell is one of the rare few pentagons.

  • get_face_count(): returns the number of faces that intersect with the H3 index.

Value

See details.

Examples

cells_ids <-c(
    "85e22da7fffffff", "85e35ad3fffffff", 
    "85e22daffffffff", "85e35adbfffffff", 
    "85e22db7fffffff", "85e35e6bfffffff",
    "85e22da3fffffff"
  ) 
  
cells <- h3o::h3_from_strings(cells_ids)

h3_resolution(cells)
h3_base_cell(cells)
is_valid_h3(c("85e22db7fffffff", NA, "oopsies"))
is_res_class_iii(cells)
is_res_class_iii(h3_from_xy(0, 0, 10))
is_pentagon(h3_from_strings("08FD600000000000"))
get_face_count(cells)

h3o documentation built on Aug. 29, 2025, 5:34 p.m.