| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
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
- cellToParent :: H3Index -> Int -> Either H3ErrorCodes H3Index
- cellToCenterChild :: H3Index -> Int -> Either H3ErrorCodes H3Index
- cellToChildPos :: H3Index -> Int -> Either H3ErrorCodes Int64
- childPosToCell :: Int64 -> H3Index -> Int -> Either H3ErrorCodes H3Index
- cellToChildren :: H3Index -> Int -> Either H3ErrorCodes [H3Index]
- compactCells :: [H3Index] -> Either H3ErrorCodes [H3Index]
- uncompactCells :: [H3Index] -> Int -> Either H3ErrorCodes [H3Index]
Documentation
Arguments
| :: H3Index | cell |
| -> Int | parentRes |
| -> Either H3ErrorCodes H3Index |
Provides the parent index containing cell
Arguments
| :: H3Index | cell |
| -> Int | childRes |
| -> Either H3ErrorCodes H3Index |
Provides the center child index contained by cell at resolution childRes.
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.
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.
Arguments
| :: H3Index | cell |
| -> Int | childRes |
| -> Either H3ErrorCodes [H3Index] |
Returns children with the indexes contained by cell at resolution childRes.
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.
Arguments
| :: [H3Index] | compactedSet |
| -> Int | res |
| -> Either H3ErrorCodes [H3Index] |
Uncompacts the set compactedSet of indexes to the resolution res