Module cellid

Source
Expand description

S2 Cell ID

Structs§

S2CellId
An S2CellId is a 64-bit unsigned integer that uniquely identifies a cell in the S2 cell decomposition. It has the following format:

Constants§

K_FACE_BITS
The number of bits used to encode the face of the cell.
K_LOOKUP_BITS
The number of bits used to encode the orientation of the Hilbert curve
K_MAX_LEVEL
The maximum level in the S2 cell decomposition
K_MAX_SIZE
The maximum number of cells in the S2 cell decomposition
K_NUM_FACES
The number of faces in the S2 cell projection
K_POS_BITS
The number of bits used to encode the position along the Hilbert curve
K_WRAP_OFFSET
This is the offset required to wrap around from the beginning of the Hilbert curve to the end or vice versa; see nextWrap() and prevWrap(). SWIG doesn’t understand uint64{}, so use static_cast.

Functions§

lsb_for_level
Return the lowest-numbered bit that is on for cells at the given level.
size_ij
Return the range maximum of a level (zoom) in I-J space
size_st
Return the range maximum of a level (zoom) in S-T space

Type Aliases§

CellId
Cell ID works with both S2 and WM with a common interface