itacart.hierarchy.get_descendants
- itacart.hierarchy.get_descendants(index, target_res)[source]
Stream every descendant at a target resolution.
Cardinality grows fast: from resolution 1 to 13 a base cell away from the border undergoes twelve refinements, six of ratio 4 and six of ratio 25, hence
(4 * 25) ** 6— one million million cells. Always a generator, never a list.- Parameters:
- Yields:
str– Atomic index strings attarget_res.- Raises:
MaxResolutionError – If
target_resexceeds resolution 13.NonExistentCellError – If any addressed cell names no cell.
ResolutionError – If
target_resis not finer than any input cell.GeometryError – If the descent reaches the cell that holds a pole at resolution 10, whose children cannot be enumerated. A known limitation; see the module’s notes. Raised as the stream is iterated.
- Return type: