itacart.index.parse
- itacart.index.parse(index)[source]
Parse an index string into a nested structural tree.
The tree is the shared substrate for hierarchy, topology and serialization; most callers want
decompose()instead.Every node carries
code,resolutionandchildren. The root is the globe —resolution-1 andcodeNone— and carries two further keys:quadrantandbase_cell, each holding the one code when the index has exactly one andNonewhen it addresses several.base_cellis the bareX/Ycomponent, not the qualified form thatbase_cell_of()returns.- Parameters:
index (
str) – Compositional index string.- Return type:
- Returns:
A nested mapping with
quadrant,base_cellandchildren.- Raises:
InvalidIndexError – On malformed syntax, unbalanced parentheses, or a refinement code outside the alphabet of its resolution.