itacart.resolutions.refinement_ratio

itacart.resolutions.refinement_ratio(resolution)[source]

Number of children produced when refining into resolution.

Even resolutions come from a 1-to-4 subdivision, odd resolutions from a 1-to-25 subdivision. Resolution 1 is a special case: it is the base 10 km grid addressed by Cartesian integers, not a refinement.

This is an area ratio. The side of the child shrinks by linear_refinement_ratio(), which is its square root.

Parameters:

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

Return type:

int

Returns:

4 for even resolutions, 25 for odd ones.

Raises:

ResolutionError – If resolution is below 2 or above 13.