itacart.hierarchy.child_position
- itacart.hierarchy.child_position(cell)[source]
Ordinal of a cell among its siblings.
Zero-based against the refinement alphabet of the cell’s resolution:
1-4for even levels,A1-E5in row-major order for odd.Under a border-absorbing parent the alphabet rank is not an ordinal, because two siblings can carry the same code under different column prefixes. There the ordinal is the position in the enumeration of
get_children(): own stem before eastern stem, alphabet order within each. Away from the border the two definitions agree, and the cheap one is used.- Parameters:
cell (
str) – Compositional index string.- Return type:
- Returns:
An ordinal for a single cell, or a positionally aligned list.
- Raises:
MinResolutionError – If any addressed cell is a whole quadrant.
NonExistentCellError – If any addressed cell names no cell, or has no parent cell.
ResolutionError – If any addressed cell is a resolution-1 cell.