Logical versus geometric containment

Hierarchy

H3 parent/child cells do not nest geometrically the way quadtree tiles do — a child's boundary is not fully inside its parent's boundary in every case, so geometric point-in-polygon tests can disagree with the logical h3ToParent relationship.

Detection

Compute cellToParent(child) logically, then separately test point-in-polygon of the child centroid against the parent boundary polygon; flag disagreement.

Mitigation

  • Always use h3ToParent/cellToChildren for hierarchy logic, never geometric point-in-polygon
  • Document to consumers that H3 hierarchy is index-based, not strictly geometric containment

Affected conversions

  • Cell systemcell system