Function S2RegionCoverer.isCanonical
Returns true if the given S2CellId vector represents a valid covering that conforms to the current covering parameters. In particular:
bool isCanonical
(
in const(s2 .s2cell_union .S2CellUnion) covering
) const;
- 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).