[][src]Module s2::cellid

Structs

CellID

CellID uniquely identifies a cell in the S2 cell decomposition. The most significant 3 bits encode the face number (0-5). The remaining 61 bits encode the position of the center of this cell along the Hilbert curve on that face. The zero value and the value (1<<64)-1 are invalid cell IDs. The first compares less than any valid cell ID, the second as greater than any valid cell ID.

Iter

Constants

IJ_TO_POS
MAX_LEVEL
MAX_SIZE
NUM_FACES
POS_BITS
POS_TO_IJ
POS_TO_ORIENTATION

Functions

find_lsb_set_nonzero64
ij_level_to_bound_uv

ij_level_to_bound_uv returns the bounds in (u,v)-space for the cell at the given level containing the leaf cell with the given (i,j)-coordinates.

size_ij