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.cellToParentFunction
cellToParent(h::H3Index, parentRes::Int) -> Tuple{H3Error, H3Index}

Get the parent cell at the given coarser resolution.

See also the H3 C API: cellToParent

source
FastH3.cellToChildrenFunction
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

source
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

source
FastH3.cellToChildPosFunction
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

source
FastH3.childPosToCellFunction
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

source

Compact / Uncompact

FastH3.compactCellsFunction
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

source
FastH3.uncompactCellsFunction
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

source
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

source
FastH3.uncompactCellsSizeFunction
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

source

Resolution 0 and Pentagons

FastH3.getRes0CellsFunction
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

source
getRes0Cells() -> Tuple{H3Error, Vector{H3Index}}

Get all resolution 0 (base cell) indexes.

See also the H3 C API: getRes0Cells

source
FastH3.getPentagonsFunction
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

source
getPentagons(res::Int) -> Tuple{H3Error, Vector{H3Index}}

Get all pentagon cell indexes at the given resolution.

See also the H3 C API: getPentagons

source