Function S2Region.getCellUnionBound

Returns a small collection of S2CellIds whose union covers the region. The cells are not sorted, may have redundancies (such as cells that contain other cells), and may cover much more area than necessary.

abstract void getCellUnionBound (
  out S2CellId[] cellIds
);

This method is not intended for direct use by client code. Clients should typically use S2RegionCoverer::GetCovering, which has options to control the size and accuracy of the covering. Alternatively, if you want a fast covering and don't care about accuracy, consider calling

S2RegionCoverer

:GetFastCovering (which returns a cleaned-up version of the covering computed by this method).

GetCellUnionBound() implementations should attempt to return a small covering (ideally 4 cells or fewer) that covers the region and can be computed quickly. The result is used by S2RegionCoverer as a starting point for further refinement.

TODO(ericv): Remove the default implementation.