S2CellId.this

Construct a leaf cell containing the given point "p". Usually there is is exactly one such cell, but for points along the edge of a cell, any adjacent cell may be (deterministically) chosen. This is because S2CellIds are considered to be closed sets. The returned cell will always contain the given point, i.e.

S2Cell(S2CellId(p)).Contains(p)

is always true. The point "p" does not need to be normalized.

If instead you want every point to be contained by exactly one S2Cell, you will need to convert the S2CellIds to S2Loops (which implement point containment this way).

  1. this(ulong id)
  2. this(S2Point p)
    struct S2CellId
    this
    ()
  3. this(S2LatLng ll)

Meta