Available on crate features
cells3d and raster only.Expand description
h3o u64 boundary (PHASE-R-MAP §4 / divergence D7): all bitwise spatial
algebra for the raster crate lives here, never leaking into graph
semantics. CellIndex (u64-backed NonZeroU64) is the spatial index
domain type end-to-end; it is stringified only when it crosses the
graph’s stringly-typed ID boundary. Feature-gated cells3d. Task 9.
Structs§
- Extensives
- Extensive (summable) quantities carried per grid cell (
aggregateCells,topology-deck.html:371-380):c,v,s,t(transformation transfer), andn(member count) all sum under aggregation;hx/hz(ground position) sum too, then are divided bynat the call site to recover the mean position (mirrors the deck’shx/=n; hz/=n).
Functions§
- aggregate_
by_ parent GROUP BY parent(h3_index)(Deviation 7): coarse-grainscells— each(CellIndex, Extensives)pair rolls up toparent(coarse_res), extensives summed. Output order is the order each parent is FIRST encountered while scanningcells(deterministic, independent of any hash order — noHashMapiteration order leaks into the returnedVec). Bounded:cells.len()iterations,cells.len()worst-case output rows.- industry_
cell - Snap an industry’s axial
(hq, hr)offset to a realh3o::CellIndex, anchored atorigin— the inverse ofto_local_ij(Finding 10):CellIndex::try_from(LocalIJ::new(origin, CoordIJ::new(hq, hr))). ReturnsErr(LocalIjError::Pentagon)explicitly when the offset crosses pentagon distortion (12 of 122 base cells are pentagons) — callers MUST handle it, never.unwrap()(Power-of-10 rule 4). - origin_
cell - A fixed, deterministic origin cell for the deck’s invariant industry hex
grid, at
resolution. The deck’s own grid (topology-deck.html:169-172) is a synthetic axial-coordinate mock with no geographic meaning;h3orequires a real anchor, so(0,0)lat/lng is used — arbitrary but fixed, making everyindustry_cellcall a pure function of(hq,hr).