Hierarchy
Functions for navigating the parent/child cell hierarchy and compact/uncompact operations.
Corresponds to the H3 C API Hierarchy section.
Parent / Child Navigation
FastH3.cellToParent — Function
cellToParent(h::H3Index, parentRes::Int) -> Tuple{H3Error, H3Index}Get the parent cell at the given coarser resolution.
See also the H3 C API: cellToParent
FastH3.cellToCenterChild — Function
cellToCenterChild(h::H3Index, childRes::Int) -> Tuple{H3Error, H3Index}Get the center child cell at the given finer resolution.
See also the H3 C API: cellToCenterChild
FastH3.cellToChildren — Function
cellToChildren(op::F, h::H3Index, childRes::Int) -> H3Error where {F}Call op(child) for each child of h at resolution childRes (no result vector allocated).
See also the H3 C API: cellToChildren
cellToChildren(h::H3Index, childRes::Int) -> Tuple{H3Error, Vector{H3Index}}Get all children of a cell at a given finer resolution.
See also the H3 C API: cellToChildren
FastH3.cellToChildrenSize — Function
cellToChildrenSize(h::H3Index, childRes::Int) -> Tuple{H3Error, Int64}Get the number of children at the given finer resolution.
See also the H3 C API: cellToChildrenSize
FastH3.cellToChildPos — Function
cellToChildPos(child::H3Index, parentRes::Int) -> Tuple{H3Error, Int64}Get the position of a child cell within its parent's ordered children.
See also the H3 C API: cellToChildPos
FastH3.childPosToCell — Function
childPosToCell(childPos::Int64, parent::H3Index, childRes::Int) -> Tuple{H3Error, H3Index}Convert a child position to the corresponding child cell.
See also the H3 C API: childPosToCell
Compact / Uncompact
FastH3.compactCells — Function
compactCells(h3Set::Vector{H3Index}) -> Tuple{H3Error, Vector{H3Index}}Compact a set of cells into the smallest equivalent set.
See also the H3 C API: compactCells
FastH3.uncompactCells — Function
uncompactCells(op::F, compactedSet::Vector{H3Index}, res::Int) -> H3Error where {F}Call op(cell) for each cell produced by uncompacting to resolution res (no result vector allocated by this path).
See also the H3 C API: uncompactCells
uncompactCells(compactedSet::Vector{H3Index}, res::Int) -> Tuple{H3Error, Vector{H3Index}}Uncompact a set of cells to the given resolution.
See also the H3 C API: uncompactCells
FastH3.uncompactCellsSize — Function
uncompactCellsSize(compactedSet::Vector{H3Index}, res::Int) -> Tuple{H3Error, Int64}Get the number of cells that would result from uncompacting to the given resolution.
See also the H3 C API: uncompactCellsSize
Resolution 0 and Pentagons
FastH3.getRes0Cells — Function
getRes0Cells(op::F) -> H3Error where {F}Call op(h) for each resolution-0 base cell index (no result vector allocated).
See also the H3 C API: getRes0Cells
getRes0Cells() -> Tuple{H3Error, Vector{H3Index}}Get all resolution 0 (base cell) indexes.
See also the H3 C API: getRes0Cells
FastH3.getPentagons — Function
getPentagons(op::F, res::Int) -> H3Error where {F}Call op(h) for each pentagon cell index at resolution res (no result vector allocated).
See also the H3 C API: getPentagons
getPentagons(res::Int) -> Tuple{H3Error, Vector{H3Index}}Get all pentagon cell indexes at the given resolution.
See also the H3 C API: getPentagons
FastH3.pentagonCount — Function
pentagonCount() -> IntReturn the number of pentagon cells per resolution (always 12).
See also the H3 C API: pentagonCount