Crate h3o_bit

Source
Expand description

The h3o-bit library provides bit twiddling routines for H3 indexes.

This is a low-level library that assumes that you know what you’re doing (there are no guardrails: garbage-in, garbage-out).

Unless you’re implementing algorithms/data structures for H3 indexes, you should be using h3o.

This crate is mostly for sharing low-level primitives between the h3o crates, thus the API is enriched on a need basis.

Constants§

DEFAULT_CELL_INDEX
Default cell index (resolution 0, base cell 0).
DIRECTION_BITSIZE
Size, in bits, of a direction (range [0; 6].
MAX_RESOLUTION
Maximum supported H3 resolution.

Functions§

clr_direction
Clears the H3 index direction at the given resolution.
clr_resolution
Clears the H3 index resolution bits.
direction_mask
Returns the bit mask of the direction at this resolution in an H3 index.
direction_offset
Returns the bit offset of the direction at this resolution in an H3 index.
get_base_cell
Returns the H3 index base cell bits.
get_direction
Returns the H3 index direction bits at the given resolution.
get_resolution
Returns the H3 index resolution.
set_base_cell
Sets the H3 index base cell bits.
set_direction
Set the H3 index direction bits at the given resolution.
set_resolution
Sets the H3 index resolution bits.