itacart.resolutions.linear_refinement_ratio
- itacart.resolutions.linear_refinement_ratio(resolution)[source]
Factor by which the cell side shrinks when refining into
resolution.2whererefinement_ratio()is 4,5where it is 25 – the exact integer square root, since the cell is a parallelogram whose base and height are equal and both divide by the same factor.Coordinate descent uses this one; child enumeration uses
refinement_ratio(). Table 1 states both, in different columns, and confusing them produces a wrong cell in silence rather than an exception, which is the most expensive failure mode in this package which is the linear ratio and not the area one.Called
subdivisions_per_axisinitacart_core/resolutions.py. That version returns1at resolution 1, treating the base grid as an anchor; this one raises instead. A descent loop that reads1for resolution 1 divides the side by one and silently produces a cell at the wrong level, which is the same failure mode the area/linear split exists to prevent.- Parameters:
resolution (
int) – Target resolution level, 2 to 13.- Return type:
- Returns:
2for even resolutions,5for odd ones.- Raises:
ResolutionError – If
resolutionis below 2 or above 13.