Function S2RegionCoverer.Options.minLevel
Sets the minimum and maximum cell levels to be used. The default is to use all cell levels.
int minLevel() const;
To find the cell level corresponding to a given physical distance, use the S2Cell metrics defined in s2metrics.h. For example, to find the cell level that corresponds to an average edge length of 10km, use:
int level =
AVG_EDGE .getClosestLevel(S2Earth .kmToRadians(length_km));
Note that min_level() takes priority over max_cells(), i.e. cells below the given level will never be used even if this causes a large number of cells to be returned. (This doesn't apply to interior coverings, since interior coverings make no completeness guarantees -- the result is simply a set of cells that covers as much of the interior as possible while satisfying the given restrictions.)
Requires
max_level() >= min_level()
Default
0