get_parents | R Documentation |
Functions used to traverse the hierarchy of H3 grids.
get_parents(x, resolution)
get_children(x, resolution)
get_children_count(x, resolution)
get_children_center(x, resolution)
get_children_position(x, resolution)
get_children_at(x, position, resolution)
x |
an |
resolution |
a scalar integer representing the grid resolution in the range [0, 15]. |
position |
the integer position in the ordered set of cells. |
get_parents()
: returns the parent cells for an H3
vector at a given resolution. Errors if the resolution is smaller than the provided cell.
get_children()
: returns a list of H3
vectors containing the children of each H3 cell at a specified resolution. If the resolution is greater than the cell's resolution an empty vector is returned.
get_children_count()
: returns an integer vector containing the number of children for each cell at the specified resolution.
get_children_center()
: returns the middle child (center child) for all children of an H3 cell at a specified resolution as an H3
vector.
get_children_position()
: returns the position of the observed H3 cell in an ordered list of all children as a child of a higher resolution cell (PR for clearer language welcome).
get_children_at()
: returns the child of each H3 cell at a specified resolution based on its position in an ordered list (PR for clearer language welcome).
See details.
h3_strs <- c("841f91dffffffff", "841fb59ffffffff")
h3 <- h3_from_strings(h3_strs)
get_parents(h3, 3)
get_children(h3, 5)
get_children_count(h3, 6)
get_children_position(h3, 3)
get_children_at(h3, 999, 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.