S2RegionCoverer.isCanonical

Returns true if the given S2CellId vector represents a valid covering that conforms to the current covering parameters. In particular:

- All S2CellIds must be valid.

- S2CellIds must be sorted and non-overlapping.

- S2CellId levels must satisfy min_level(), max_level(), and level_mod().

- If covering.size() > max_cells(), there must be no two cells with a common ancestor at min_level() or higher.

- There must be no sequence of cells that could be replaced by an ancestor (i.e. with level_mod() == 1, the 4 child cells of a parent).

  1. bool isCanonical(S2CellUnion covering)
    class S2RegionCoverer
    const
    bool
    isCanonical
  2. bool isCanonical(S2CellId[] covering)

Meta