API Reference

Resolution Statistics

Precomputed data for IGEO7 grid resolutions (0–20).

Missing docstring.

Missing docstring for get_resolution_stats. Check Documenter's build log for details.

IGEO7.get_num_cellsFunction
get_num_cells(resolution::Int)

Get the total number of cells in the IGEO7 grid at a given resolution.

source
IGEO7.get_cell_area_m2Function
get_cell_area_m2(resolution::Int)

Get the average cell area in square meters (m²) at a given resolution.

source
IGEO7.get_cell_area_km2Function
get_cell_area_km2(resolution::Int)

Get the average cell area in square kilometers (km²) at a given resolution.

source
IGEO7.get_cls_mFunction
get_cls_m(resolution::Int)

Get the characteristic length scale (CLS) in meters (m) at a given resolution.

source
IGEO7.get_cls_kmFunction
get_cls_km(resolution::Int)

Get the characteristic length scale (CLS) in kilometers (km) at a given resolution.

source
IGEO7.find_resolution_by_valueFunction
find_resolution_by_value(target::Real, metric::Symbol; prefer::Symbol=:closest)

Find the grid resolution (0-20) that best matches a target value for a specific metric. Metrics include :num_cells, :area_km2, :area_m2, :cls_km, and :cls_m. Strategy prefer can be :closest, :larger, or :smaller.

source
IGEO7.find_resolution_by_cls_mFunction
find_resolution_by_cls_m(target_m::Real; prefer::Symbol=:closest)

Find the best resolution matching a target characteristic length scale in meters.

source

Indexing and Types

The core data structures and conversion utilities for Z7 cell indices.

IGEO7.Z7IndexUInt64Type
Z7IndexUInt64(raw::UInt64)

A Z7 cell index representation that stores only the raw UInt64 value. Digits are extracted on-the-fly using bit manipulation.

source
IGEO7.Z7IndexCompType
Z7IndexComp(raw::UInt64)

A Z7 cell index representation that decodes and stores its digits in an SVector upon construction. Faster for multiple digit accesses at the cost of higher construction time and memory.

source
Missing docstring.

Missing docstring for decode_z7hex_index. Check Documenter's build log for details.

Missing docstring.

Missing docstring for encode_z7hex_index. Check Documenter's build log for details.

Missing docstring.

Missing docstring for decode_z7int. Check Documenter's build log for details.

Missing docstring.

Missing docstring for encode_z7int. Check Documenter's build log for details.

IGEO7.get_digitFunction
get_digit(idx, i::Int)

Get the digit at resolution i (1-indexed). Digits are 0-6, or 7 if beyond resolution.

source
IGEO7.get_parentFunction
get_parent(idx, [resolution])

Get the parent cell of the given index at the specified resolution (defaults to current resolution - 1).

source
get_parent(idx)

Get the parent cell of the given index at the previous resolution.

source

Neighbor Traversal

Methods for finding adjacent cells and navigating the grid.

IGEO7.get_neighboursFunction
get_neighbours(ref)

Find all 6 immediate neighbors (or 5 for pentagons) of a given cell index. Invalid neighbors for pentagonal base cells are marked with a bitmask of typemax(UInt64).

source

Compute all 6 neighbours of a Z7IndexComp cell at its resolution.

source
IGEO7.get_neighbourFunction
get_neighbour(ref, direction, resolution)

Compute a single neighbor index in one of 6 directions (1-6) at the given resolution level. Returns a Z7Carry struct which tracks the new index and whether the cell crossed a base cell boundary.

source

Compute a single neighbour in direction N (1-6) at a given resolution for Z7IndexComp.

source
IGEO7.get_base_cell_neighbourFunction

Get the neighbour base cell in a specific direction (0-4 for pentagons). Returns nothing if direction is invalid (≥5 for pentagons).

We could also instead of limiting at 5 use the now filled directions

source