itacart.constants.refinement_alphabet

itacart.constants.refinement_alphabet(resolution)[source]

Return the refinement alphabet addressing resolution.

This is the only place in the package where the even/odd rule is written, which is the whole point: an earlier version held a second, inverted copy of it living in the parser.

Parameters:

resolution (int) – Resolution level, 2 to 13.

Return type:

tuple[str, ...]

Returns:

QUATERNARY_CODES for even resolutions, QUINARY_CODES for odd ones.

Raises:

ResolutionError – If resolution is outside 0..13, or is 0 or 1. Resolution 0 is addressed by a quadrant code and resolution 1 by an XXXX/YYYY pair; neither is a refinement.