Interactive publication
Back to the catalogueHierarchyCase 03 of 06
Logical versus geometric containment
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.
Class
Case to account for
Affects
1 conversion
01
Detection
Compute cellToParent(child) logically, then separately test point-in-polygon of the child centroid against the parent boundary polygon; flag disagreement.
02
Mitigation
01
Always use h3ToParent/cellToChildren for hierarchy logic, never geometric point-in-polygon
02
Document to consumers that H3 hierarchy is index-based, not strictly geometric containment
03
Affected conversions
Cell systemcell system
OPEN