S2CellUnion.expand

Expands the cell union such that it contains all points whose distance to the cell union is at most "min_radius", but do not use cells that are more than "max_level_diff" levels higher than the largest cell in the input. The second parameter controls the tradeoff between accuracy and output size when a large region is being expanded by a small amount (e.g. expanding Canada by 1km). For example, if max_level_diff == 4 the region will always be expanded by approximately 1/16 the width of its largest cell. Note that in the worst case, the number of cells in the output can be up to 4 * (1 + 2 ** max_level_diff) times larger than the number of cells in the input.

  1. void expand(int expand_level)
  2. void expand(S1Angle min_radius, int max_level_diff)
    class S2CellUnion

Meta