h3-hs-0.2.0.0: A Haskell binding for H3
Safe HaskellSafe-Inferred
LanguageHaskell2010

H3.Hierarchy

Description

These functions permit moving between resolutions in the H3 grid system. The functions produce parent cells (coarser), or child cells (finer).

Synopsis

Documentation

cellToParent Source #

Arguments

:: H3Index

cell

-> Int

parentRes

-> Either H3ErrorCodes H3Index 

Provides the parent index containing cell

cellToCenterChild Source #

Arguments

:: H3Index

cell

-> Int

childRes

-> Either H3ErrorCodes H3Index 

Provides the center child index contained by cell at resolution childRes.

cellToChildPos Source #

Arguments

:: H3Index

child

-> Int

parentRes

-> Either H3ErrorCodes Int64 

Returns the position of the child cell within an ordered list of all children of the cell's parent at the specified resolution parentRes. The order of the ordered list is the same as that returned by cellToChildren. This is the complement of childPosToCell.

childPosToCell Source #

Arguments

:: Int64

childPos

-> H3Index

parent

-> Int

childRes

-> Either H3ErrorCodes H3Index 

Returns the child cell at a given position within an ordered list of all children of parent at the specified resolution childRes. The order of the ordered list is the same as that returned by cellToChildren. This is the complement of cellToChildPos.

cellToChildren Source #

Arguments

:: H3Index

cell

-> Int

childRes

-> Either H3ErrorCodes [H3Index] 

Returns children with the indexes contained by cell at resolution childRes.

compactCells Source #

Arguments

:: [H3Index]

cellSet

-> Either H3ErrorCodes [H3Index] 

Compacts the set cellSet of indexes as best as possible. Cells in cellSet must all share the same resolution.

uncompactCells Source #

Arguments

:: [H3Index]

compactedSet

-> Int

res

-> Either H3ErrorCodes [H3Index] 

Uncompacts the set compactedSet of indexes to the resolution res