itacart.resolutions.resolution_for_scale
- itacart.resolutions.resolution_for_scale(denominator, kind='visualization')[source]
Resolution adequate for a target cartographic scale.
Inverse of
scale_for_resolution(); the practical entry point for a surveyor who knows the map scale but not the grid level. On the 13 denominators printed in Table 1 it returns exactly the row they came from, in both families.Between table rows the two families bound fineness from opposite sides, because the two rules they encode are opposite:
visualizationasks that a cell still be drawable, so the answer is the finest level whose cells stay at or above 0.1 mm on paper. At 1:2 000 that is resolution 10; resolution 11 would render at 0.05 mm and vanish.analysisasks that a cell be fine enough to sample, so the answer is the coarsest level at or below the 0.5 mm ground distance. At 1:3 000 that is resolution 9.
- Parameters:
- Return type:
- Returns:
Resolution level, 1 to 13.
- Raises:
ResolutionError – If
kindis not a known scale family, ifdenominatoris not a positive integer, or if no resolution satisfies the target: a visualization scale coarser than 1:100 000 000 has no drawable level, and an analysis scale finer than 1:20 has no level fine enough.