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:
- Returns:
QUATERNARY_CODESfor even resolutions,QUINARY_CODESfor odd ones.- Raises:
ResolutionError – If
resolutionis outside 0..13, or is 0 or 1. Resolution 0 is addressed by a quadrant code and resolution 1 by anXXXX/YYYYpair; neither is a refinement.